Changeset 53 for scripts/usr/local/lib/7dtd/commands/updatescripts.sh
- Timestamp:
- Jun 9, 2014, 2:00:26 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
scripts/usr/local/lib/7dtd/commands/updatescripts.sh
r51 r53 4 4 5 5 sdtdCommandUpdatescripts() { 6 LOCAL=$(cat /usr/local/lib/7dtd/VERSION | grep "Version" | cut -d\ -f2)7 REMOTE=$(wget -qO- http://illy.bz/fi/7dtd/VERSION | grep "Version" | cut -d\ -f2)6 local LOCAL=$(cat /usr/local/lib/7dtd/VERSION | grep "Version" | cut -d\ -f2) 7 local REMOTE=$(wget -qO- http://illy.bz/fi/7dtd/VERSION | grep "Version" | cut -d\ -f2) 8 8 9 if [ $REMOTE -gt $LOCAL ]; then 9 local FORCED 10 if [ "$1" = "--force" ]; then 11 FORCED=yes 12 else 13 FORCED=no 14 fi 15 if [ "$FORCED" = "yes" -o $REMOTE -gt $LOCAL ]; then 10 16 echo "A newer version of the scripts is available." 11 17 echo "Local: v.$LOCAL" … … 58 64 59 65 sdtdCommandUpdatescriptsHelp() { 60 echo "Usage: $(basename $0) updatescripts "66 echo "Usage: $(basename $0) updatescripts [--force]" 61 67 echo 62 68 echo "Check for a newer version of the management scripts. If there is a newer" 63 69 echo "version they can be updated by this command." 70 echo 71 echo "If --force is specified you are asked if you want to redownload the scripts" 72 echo "even if there is no new version available." 64 73 } 65 74 … … 68 77 } 69 78 79 sdtdCommandUpdatescriptsExpects() { 80 case $1 in 81 2) 82 echo "--force" 83 ;; 84 esac 85 } 86
Note:
See TracChangeset
for help on using the changeset viewer.