Commit c3adf40f authored by Nick Thomas's avatar Nick Thomas

Remove bashism from scripts/prepare_build.sh

parent 688ff26d
#!/bin/bash
#!/bin/sh
retry() {
if eval "$@"; then
......@@ -24,11 +24,12 @@ if [ -f /.dockerenv ] || [ -f ./dockerinit ]; then
cp config/resque.yml.example config/resque.yml
sed -i 's/localhost/redis/g' config/resque.yml
export FLAGS=(--path vendor --retry 3 --quiet)
export FLAGS="--path vendor --retry 3 --quiet"
else
export PATH=$HOME/bin:/usr/local/bin:/usr/bin:/bin
rnd=$(awk 'BEGIN { srand() ; printf("%d\n",rand()*5) }')
export PATH="$HOME/bin:/usr/local/bin:/usr/bin:/bin"
cp config/database.yml.mysql config/database.yml
sed "s/username\:.*$/username\: runner/" -i config/database.yml
sed "s/password\:.*$/password\: 'password'/" -i config/database.yml
sed "s/gitlabhq_test/gitlabhq_test_$((RANDOM/5000))/" -i config/database.yml
sed "s/gitlabhq_test/gitlabhq_test_$rnd/" -i config/database.yml
fi
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment