Bram Moolenaar | 1aa5f1c | 2023-06-22 21:57:51 +0100 | [diff] [blame] | 1 | #!/bin/ksh |
| 2 | # Shall we debug this script? If so, remove the '#' before '#DebugScript=set' |
| 3 | DebugScript=set |
| 4 | |
| 5 | # Show that we are busy. |
| 6 | [ -t 0 ] && echo "Please wait ... \c" >`tty` |
| 7 | |
| 8 | ################################################################################ |
| 9 | # |
| 10 | # Display some Help |
| 11 | # |
| 12 | Usage () { |
| 13 | |
| 14 | # does this comment work? |
| 15 | VariableName="${BasicConfigName}_*" |
| 16 | |
| 17 | # Echo some ksh special variables |
| 18 | echo "CDPATH="${CDPATH} |
| 19 | |
| 20 | # Get also a short description of the backuptype/method |
| 21 | eval BackupMethod=\$mess09${BackupType}B |
| 22 | |
| 23 | case $BackupType in |
| 24 | 3) DefaultDevice=$MountDevice ;; |
| 25 | 1|2) DefaultDevice=$TapeDrive ;; |
| 26 | esac |
| 27 | |
| 28 | # If we have more the 53 characters in the variables below split them up |
| 29 | # into several lines and add 3 tabs before them |
| 30 | for Variable in DefaultExclude DefaultFindOption DoNotBackupList |
| 31 | do |
| 32 | eval VarValue=\$$Variable |
| 33 | VarValue=`echo $VarValue | FoldS 53 | sed "2,\\$s/^/$Tab$Tab$Tab/"` |
| 34 | eval $Variable=\$VarValue |
| 35 | done |
| 36 | |
| 37 | echo " |
| 38 | Usage: $ScriptName [-Options] |
| 39 | |
| 40 | Options List: |
| 41 | -v The current version of '$ScriptName' |
| 42 | -h | -H | ? Display this list |
| 43 | |
| 44 | " |
| 45 | |
| 46 | } # End of Usage |
| 47 | |
| 48 | |
| 49 | ################################################################################ |
| 50 | # |
| 51 | # Create a backup using fbackup/frecover |
| 52 | # |
| 53 | ExecuteFbackup () { # TESTING |
| 54 | |
| 55 | [ "$DebugScript" ] && set -x || set +x |
| 56 | |
| 57 | cd $cwd |
| 58 | |
| 59 | } # End of ExecuteFbackup |
| 60 | |
| 61 | |
| 62 | ################################################################################ |
| 63 | # main ### main ### main ### main ### main ### main ### main ### main ### main # |
| 64 | ################################################################################ |
| 65 | # |
| 66 | # Here is the heart of this script: |
| 67 | # |
| 68 | Usage |
| 69 | |
| 70 | # And exit |
| 71 | Exit $Result |