Skip to content

Commit

Permalink
Fix wrong working path
Browse files Browse the repository at this point in the history
  • Loading branch information
K-Ko committed Sep 16, 2018
1 parent ce3492f commit a12d732
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions bin/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,20 @@ eval $(grep -v '^;' $cfg | sed 's/ *\(=\) */\1/g')
new=$(mktemp)
trap 'rm $new >/dev/null &>/dev/null' 0

cd $path

### Fetch latest Adminer for MySQL only
wget -qO $new http://www.adminer.org/$version

### Check if the download was successful
### (sometimes the downlaoded file is empty, I think it happens on timeouts)
if [ -s $new ]; then
### Change attributes and owner to the same as index.php
chmod --reference=$path/index.php $new
chown --reference=$path/index.php $new

### Move the just downloaded file to its correct name
mv $new $path/adminer.php
mv $new adminer.php

### Change attributes and owner to the same as index.php
chmod --reference=index.php adminer.php
chown --reference=index.php adminer.php
fi

### Update sub modules
Expand Down

0 comments on commit a12d732

Please sign in to comment.