Changeset 23 for scripts/usr/local/lib/7dtd/commands
- Timestamp:
- May 26, 2014, 1:53:39 PM (11 years ago)
- Location:
- scripts/usr/local/lib/7dtd/commands
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
scripts/usr/local/lib/7dtd/commands/backup.sh
r20 r23 1 1 #!/bin/bash 2 # Version 53 2 4 3 # Backups game data files. -
scripts/usr/local/lib/7dtd/commands/instances.sh
r20 r23 1 1 #!/bin/bash 2 # Version 53 2 4 3 … … 52 51 esac 53 52 done 53 echo 54 54 fi 55 55 configEditAll … … 75 75 return 76 76 fi 77 77 78 78 if [ $(isRunning "$1") -eq 0 ]; then 79 79 INSTANCE=$1 80 80 loadCurrentConfigValues "$1" 81 configEditAll 82 echo 83 configSetAutoParameters "$INSTANCE" 84 echo 85 echo "Saving" 86 saveCurrentConfigValues "$1" 87 echo "Done" 81 82 while : ; do 83 echo "What section of the config do you want to edit?" 84 local i=0 85 local sects=() 86 for S in $(listConfigEditFuncs); do 87 (( i++ )) 88 sects[$i]=$S 89 printf " %2d: %s\n" $i "$S" 90 done 91 echo 92 echo " W: Save and exit" 93 echo " Q: Exit WITHOUT saving" 94 95 local SEC 96 while : ; do 97 read -p "Section number: " SEC 98 SEC=$(lowercase $SEC) 99 if [ $(isANumber $SEC) -eq 1 ]; then 100 if [ $SEC -ge 1 -a $SEC -le $i ]; then 101 break 102 fi 103 else 104 if [ "$SEC" = "q" -o "$SEC" = "w" ]; then 105 break 106 fi 107 fi 108 echo "Not a valid section number!" 109 done 110 echo 111 112 case "$SEC" in 113 q) 114 echo "Not saving" 115 break 116 ;; 117 w) 118 configSetAutoParameters "$INSTANCE" 119 echo "Saving" 120 saveCurrentConfigValues "$1" 121 echo "Done" 122 break 123 ;; 124 *) 125 configEdit${sects[$SEC]} 126 echo 127 esac 128 done 88 129 else 89 130 echo "Instance $1 is currently running. Please stop it first." -
scripts/usr/local/lib/7dtd/commands/start.sh
r20 r23 1 1 #!/bin/bash 2 # Version 53 2 4 3 # Tries to start the 7dtd instance. -
scripts/usr/local/lib/7dtd/commands/status.sh
r20 r23 1 1 #!/bin/bash 2 # Version 53 2 4 3 # Print status of given instance. -
scripts/usr/local/lib/7dtd/commands/stop.sh
r20 r23 1 1 #!/bin/bash 2 # Version 53 2 4 3 # Tries to stop the 7dtd instance given as first parameter. -
scripts/usr/local/lib/7dtd/commands/updateengine.sh
r21 r23 1 1 #!/bin/bash 2 # Version 53 2 4 3 # Tries to start the 7dtd instance.
Note:
See TracChangeset
for help on using the changeset viewer.