diff options
author | Tristan Storch <tstorch@math.uni-bielefeld.de> | 2014-08-30 15:12:53 +0200 |
---|---|---|
committer | Tristan Storch <tstorch@math.uni-bielefeld.de> | 2014-08-30 15:12:53 +0200 |
commit | 69e332f432c87ce83a488a8c06a02ded26f66beb (patch) | |
tree | 03c8ae1382e92612341df57856e9d1a17e1de8a9 /scripts | |
parent | 9bc63bda7ded31b77ad4aaf3495582a7c8555d2f (diff) | |
download | gitea-69e332f432c87ce83a488a8c06a02ded26f66beb.tar.gz gitea-69e332f432c87ce83a488a8c06a02ded26f66beb.zip |
Removed trailing white spaces
Removed trailing whitespaces with
```sh
for file in `grep -r " $" * | cut -d : -f 1 | sort | uniq | grep -v " "`; do sed -i 's/[ \t]*$//' $file; done
```
and some handwork.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/dockerfiles/build.sh | 6 | ||||
-rw-r--r-- | scripts/dockerfiles/images/gogits/Dockerfile | 4 | ||||
-rw-r--r-- | scripts/dockerfiles/images/gogits/deploy.sh | 8 | ||||
-rw-r--r-- | scripts/dockerfiles/images/memcache/Dockerfile | 2 | ||||
-rw-r--r-- | scripts/dockerfiles/images/mysql/Dockerfile | 12 | ||||
-rw-r--r-- | scripts/dockerfiles/images/postgres/Dockerfile | 6 | ||||
-rwxr-xr-x | scripts/gogs_supervisord.sh | 4 | ||||
-rwxr-xr-x | scripts/start.sh | 2 |
8 files changed, 22 insertions, 22 deletions
diff --git a/scripts/dockerfiles/build.sh b/scripts/dockerfiles/build.sh index 4617da1421..36f6a468a1 100755 --- a/scripts/dockerfiles/build.sh +++ b/scripts/dockerfiles/build.sh @@ -21,13 +21,13 @@ fi # Replace the database root password in database image Dockerfile. sed -i "s/THE_DB_PASSWORD/$DB_PASSWORD/g" images/$DB_TYPE/Dockerfile -# Replace the database root password in gogits image deploy.sh file. +# Replace the database root password in gogits image deploy.sh file. sed -i "s/THE_DB_PASSWORD/$DB_PASSWORD/g" images/gogits/deploy.sh -# Replace the apt source in gogits image Dockerfile. +# Replace the apt source in gogits image Dockerfile. sed -i "s/#$APT_SOURCE#//" images/gogits/Dockerfile # Uncomment the installation of database lib in gogs Dockerfile sed -i "s/#$DB_TYPE#//" images/gogits/Dockerfile -# Replace the database type in gogits image deploy.sh file. +# Replace the database type in gogits image deploy.sh file. sed -i "s/THE_DB_TYPE/$DB_TYPE/g" images/gogits/deploy.sh if [ $MEM_TYPE != "" ] diff --git a/scripts/dockerfiles/images/gogits/Dockerfile b/scripts/dockerfiles/images/gogits/Dockerfile index a171e15e3b..bda9e424dd 100644 --- a/scripts/dockerfiles/images/gogits/Dockerfile +++ b/scripts/dockerfiles/images/gogits/Dockerfile @@ -3,7 +3,7 @@ MAINTAINER Meaglith Ma <genedna@gmail.com> (@genedna) #aliyun#RUN echo "deb http://mirrors.aliyun.com/ubuntu/ saucy main restricted" > /etc/apt/sources.list && echo "deb http://mirrors.aliyun.com/ubuntu/ saucy-updates main restricted" >> /etc/apt/sources.list && echo "deb http://mirrors.aliyun.com/ubuntu/ saucy universe" >> /etc/apt/sources.list && echo "deb http://mirrors.aliyun.com/ubuntu/ saucy-updates universe" >> /etc/apt/sources.list && echo "deb http://mirrors.aliyun.com/ubuntu/ saucy multiverse" >> /etc/apt/sources.list && echo "deb http://mirrors.aliyun.com/ubuntu/ saucy-updates multiverse" >> /etc/apt/sources.list && echo "deb http://mirrors.aliyun.com/ubuntu/ saucy-backports main restricted universe multiverse" >> /etc/apt/sources.list && echo "deb http://mirrors.aliyun.com/ubuntu/ saucy-security main restricted" >> /etc/apt/sources.list && echo "deb http://mirrors.aliyun.com/ubuntu/ saucy-security universe" >> /etc/apt/sources.list && echo "deb http://mirrors.aliyun.com/ubuntu/ saucy-security multiverse" >> /etc/apt/sources.list -#nchc#RUN echo "deb http://free.nchc.org.tw/ubuntu/ saucy main restricted" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy main restricted" >> /etc/apt/source.list && echo "deb http://free.nchc.org.tw/ubuntu/ saucy-updates main restricted" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy-updates main restricted" >> /etc/apt/source.list && echo "deb http://free.nchc.org.tw/ubuntu/ saucy universe" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy universe" >> /etc/apt/source.list && echo "deb http://free.nchc.org.tw/ubuntu/ saucy-updates universe" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy-updates universe" >> /etc/apt/source.list && echo "deb http://free.nchc.org.tw/ubuntu/ saucy multiverse" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy multiverse" >> /etc/apt/source.list && echo "deb http://free.nchc.org.tw/ubuntu/ saucy-updates multiverse" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy-updates multiverse" >> /etc/apt/source.list && echo "deb http://free.nchc.org.tw/ubuntu/ saucy-backports main restricted universe multiverse" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy-backports main restricted universe multiverse" >> /etc/apt/source.list && echo "deb http://free.nchc.org.tw/ubuntu/ saucy-security main restricted" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy-security main restricted" >> /etc/apt/source.list && echo "deb http://free.nchc.org.tw/ubuntu/ saucy-security universe" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy-security universe" >> /etc/apt/source.list && echo "deb http://free.nchc.org.tw/ubuntu/ saucy-security multiverse" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy-security multiverse" >> /etc/apt/source.list && echo "deb http://extras.ubuntu.com/ubuntu saucy main" >> /etc/apt/source.list && echo "deb-src http://extras.ubuntu.com/ubuntu saucy main" >> /etc/apt/source.list +#nchc#RUN echo "deb http://free.nchc.org.tw/ubuntu/ saucy main restricted" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy main restricted" >> /etc/apt/source.list && echo "deb http://free.nchc.org.tw/ubuntu/ saucy-updates main restricted" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy-updates main restricted" >> /etc/apt/source.list && echo "deb http://free.nchc.org.tw/ubuntu/ saucy universe" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy universe" >> /etc/apt/source.list && echo "deb http://free.nchc.org.tw/ubuntu/ saucy-updates universe" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy-updates universe" >> /etc/apt/source.list && echo "deb http://free.nchc.org.tw/ubuntu/ saucy multiverse" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy multiverse" >> /etc/apt/source.list && echo "deb http://free.nchc.org.tw/ubuntu/ saucy-updates multiverse" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy-updates multiverse" >> /etc/apt/source.list && echo "deb http://free.nchc.org.tw/ubuntu/ saucy-backports main restricted universe multiverse" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy-backports main restricted universe multiverse" >> /etc/apt/source.list && echo "deb http://free.nchc.org.tw/ubuntu/ saucy-security main restricted" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy-security main restricted" >> /etc/apt/source.list && echo "deb http://free.nchc.org.tw/ubuntu/ saucy-security universe" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy-security universe" >> /etc/apt/source.list && echo "deb http://free.nchc.org.tw/ubuntu/ saucy-security multiverse" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy-security multiverse" >> /etc/apt/source.list && echo "deb http://extras.ubuntu.com/ubuntu saucy main" >> /etc/apt/source.list && echo "deb-src http://extras.ubuntu.com/ubuntu saucy main" >> /etc/apt/source.list RUN mkdir -p /go ENV PATH /usr/local/go/bin:/go/bin:$PATH @@ -16,7 +16,7 @@ RUN apt-get install -yq vim sudo RUN curl -sL https://golang.org/dl/go1.3.linux-amd64.tar.gz | tar -v -C /usr/local -xz RUN cd /usr/local/go/src && ./make.bash --no-clean 2>&1 -RUN go get -u -d github.com/gogits/gogs +RUN go get -u -d github.com/gogits/gogs RUN cd $GOPATH/src/github.com/gogits/gogs && git checkout dev && git pull origin dev && go install && go build -tags redis # Clean all the unused packages diff --git a/scripts/dockerfiles/images/gogits/deploy.sh b/scripts/dockerfiles/images/gogits/deploy.sh index 9408524820..4f7e7a5b0f 100644 --- a/scripts/dockerfiles/images/gogits/deploy.sh +++ b/scripts/dockerfiles/images/gogits/deploy.sh @@ -9,15 +9,15 @@ MEM_TYPE=THE_MEM_TYPE DB_TYPE_LINE=`awk '$0 ~ str{print NR}' str="DB_TYPE = mysql" $GOPATH/src/github.com/gogits/gogs/conf/app.ini` DB_PASSWORD_LINE=`awk '$0 ~ str{print NR+1}' str="USER = root" $GOPATH/src/github.com/gogits/gogs/conf/app.ini` -sed -i "${DB_TYPE_LINE}s/.*$/DB_TYPE = $DB_TYPE/g" $GOPATH/src/github.com/gogits/gogs/conf/app.ini -sed -i "${DB_PASSWORD_LINE}s/.*$/PASSWD = $DB_PASSWORD/g" $GOPATH/src/github.com/gogits/gogs/conf/app.ini +sed -i "${DB_TYPE_LINE}s/.*$/DB_TYPE = $DB_TYPE/g" $GOPATH/src/github.com/gogits/gogs/conf/app.ini +sed -i "${DB_PASSWORD_LINE}s/.*$/PASSWD = $DB_PASSWORD/g" $GOPATH/src/github.com/gogits/gogs/conf/app.ini if [ $MEM_TYPE != "" ] then MEM_HOST_LINE=`awk '$0 ~ str{print NR+6}' str="ADAPTER = memory" $GOPATH/src/github.com/gogits/gogs/conf/app.ini` - + _MEM_ADDR=`echo $MEM_PORT | cut -d '/' -f 3 | cut -d ':' -f 1` _MEM_PORT=`echo $MEM_PORT | cut -d '/' -f 3 | cut -d ':' -f 2` @@ -54,7 +54,7 @@ fi #sed -i "/HOST = 127.0.0.1:3306/c\HOST = $DB_PORT_3306_TCP_ADDR:$DB_PORT_3306_TCP_PORT" $GOPATH/src/github.com/gogits/gogs/conf/app.ini sed -i "/HOST = 127.0.0.1:3306/c\HOST = `echo $DB_PORT | cut -d '/' -f 3`" $GOPATH/src/github.com/gogits/gogs/conf/app.ini -cd $GOPATH/src/github.com/gogits/gogs/ +cd $GOPATH/src/github.com/gogits/gogs/ # The sudo is a must here, or the go within docker container won't get the current user by os.Getenv("USERNAME") sudo ./gogs web diff --git a/scripts/dockerfiles/images/memcache/Dockerfile b/scripts/dockerfiles/images/memcache/Dockerfile index a1a2b6ee41..d3a54d9548 100644 --- a/scripts/dockerfiles/images/memcache/Dockerfile +++ b/scripts/dockerfiles/images/memcache/Dockerfile @@ -13,7 +13,7 @@ RUN apt-get install -y memcached EXPOSE 11211 # Default Memcached run command arguments -# Change to limit memory when creating container in Tutum +# Change to limit memory when creating container in Tutum CMD ["-m", "64"] # Set the user to run Memcached daemon diff --git a/scripts/dockerfiles/images/mysql/Dockerfile b/scripts/dockerfiles/images/mysql/Dockerfile index a9a72e35c4..bbf5c0a834 100644 --- a/scripts/dockerfiles/images/mysql/Dockerfile +++ b/scripts/dockerfiles/images/mysql/Dockerfile @@ -6,20 +6,20 @@ MAINTAINER Meaglith Ma <genedna@gmail.com> (@genedna) RUN apt-get install -y --force-yes software-properties-common RUN add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe" RUN apt-get --yes --force-yes update -RUN apt-get --yes --force-yes upgrade +RUN apt-get --yes --force-yes upgrade ENV MYSQL_PASSWORD THE_DB_PASSWORD -RUN echo "mysql-server mysql-server/root_password password $MYSQL_PASSWORD" | debconf-set-selections +RUN echo "mysql-server mysql-server/root_password password $MYSQL_PASSWORD" | debconf-set-selections RUN echo "mysql-server mysql-server/root_password_again password $MYSQL_PASSWORD" | debconf-set-selections -RUN apt-get update && apt-get install -y --force-yes mysql-server +RUN apt-get update && apt-get install -y --force-yes mysql-server RUN sed -i -e"s/^bind-address\s*=\s*127.0.0.1/bind-address = 0.0.0.0/" /etc/mysql/my.cnf RUN service mysql restart -RUN echo "mysql -uroot -p$MYSQL_PASSWORD -e 'drop database if exists gogs;'" >> import.sh -RUN echo "mysql -uroot -p$MYSQL_PASSWORD -e 'create database gogs;'" >> import.sh +RUN echo "mysql -uroot -p$MYSQL_PASSWORD -e 'drop database if exists gogs;'" >> import.sh +RUN echo "mysql -uroot -p$MYSQL_PASSWORD -e 'create database gogs;'" >> import.sh RUN chmod +x import.sh RUN apt-get autoremove -y @@ -32,4 +32,4 @@ RUN /usr/sbin/mysqld & \ EXPOSE 3306 -CMD ["/usr/bin/mysqld_safe", "--skip-syslog", "--log-error=/dev/null"] +CMD ["/usr/bin/mysqld_safe", "--skip-syslog", "--log-error=/dev/null"] diff --git a/scripts/dockerfiles/images/postgres/Dockerfile b/scripts/dockerfiles/images/postgres/Dockerfile index 9d76873c98..7934999228 100644 --- a/scripts/dockerfiles/images/postgres/Dockerfile +++ b/scripts/dockerfiles/images/postgres/Dockerfile @@ -2,7 +2,7 @@ FROM ubuntu MAINTAINER SvenDowideit@docker.com # Add the PostgreSQL PGP key to verify their Debian packages. -# It should be the same key as https://www.postgresql.org/media/keys/ACCC4CF8.asc +# It should be the same key as https://www.postgresql.org/media/keys/ACCC4CF8.asc RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8 # Add PostgreSQL's repository. It contains the most recent stable release @@ -20,7 +20,7 @@ RUN apt-get -y -q install python-software-properties software-properties-common RUN apt-get -y -q install postgresql-9.3 postgresql-client-9.3 postgresql-contrib-9.3 # Note: The official Debian and Ubuntu images automatically ``apt-get clean`` -# after each ``apt-get`` +# after each ``apt-get`` # Run the rest of the commands as the ``postgres`` user created by the ``postgres-9.3`` package when it was ``apt-get installed`` USER postgres @@ -34,7 +34,7 @@ RUN /etc/init.d/postgresql start &&\ createdb -O root gogs # Adjust PostgreSQL configuration so that remote connections to the -# database are possible. +# database are possible. RUN echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/9.3/main/pg_hba.conf # And add ``listen_addresses`` to ``/etc/postgresql/9.3/main/postgresql.conf`` diff --git a/scripts/gogs_supervisord.sh b/scripts/gogs_supervisord.sh index 3038407ed4..4488960e6a 100755 --- a/scripts/gogs_supervisord.sh +++ b/scripts/gogs_supervisord.sh @@ -5,8 +5,8 @@ echo 'plase remember to modify the command path in etc/supervisord.conf(line 23) PID="/tmp/supervisord.pid" CONF="etc/supervisord.conf" -LOGDIR="log" -if [ ! -d $LOGDIR ]; then +LOGDIR="log" +if [ ! -d $LOGDIR ]; then mkdir $LOGDIR fi diff --git a/scripts/start.sh b/scripts/start.sh index dd9a461c4c..85de4556ff 100755 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -5,7 +5,7 @@ # # start gogs web # -IFS=' +IFS=' ' PATH=/bin:/usr/bin:/usr/local/bin USER=$(whoami) |