diff options
author | syamgk | 2015-04-13 12:09:45 +0530 |
---|---|---|
committer | syamgk | 2015-04-13 12:09:45 +0530 |
commit | 0c779cb8dbc21021e48d80912cb31f3640557355 (patch) | |
tree | cb5e357ca48e7b10619713ae2863b27c9ad623c9 /incremental-complete-backup/backup-tool.sh | |
parent | 48285ed37f78efacbde4468a23a578e27a340fba (diff) | |
download | FOSSEE-netbook-tools-0c779cb8dbc21021e48d80912cb31f3640557355.tar.gz FOSSEE-netbook-tools-0c779cb8dbc21021e48d80912cb31f3640557355.tar.bz2 FOSSEE-netbook-tools-0c779cb8dbc21021e48d80912cb31f3640557355.zip |
created gui skelton
Diffstat (limited to 'incremental-complete-backup/backup-tool.sh')
-rw-r--r-- | incremental-complete-backup/backup-tool.sh | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/incremental-complete-backup/backup-tool.sh b/incremental-complete-backup/backup-tool.sh index b357e88..0899fa4 100644 --- a/incremental-complete-backup/backup-tool.sh +++ b/incremental-complete-backup/backup-tool.sh @@ -4,3 +4,46 @@ # to external storage media. # # # #***********************************************# + +#functions() +# --------------------------------------------------------- # +# selection_menu () # +# shows the menu with two options. # +# Parameter: $1(title) $2(option1) $3(option2) # +# change the value of $result to 1 or 2 according to option # +# selected. # +# --------------------------------------------------------- # +selection_menu() { +choice="$(zenity --width=600 --height=200 --list --radiolist --title="$1" --text "<b>Choose :</b> " --hide-header --column "selection" --column "options" FALSE "$2" FALSE "$3")" + +case "${choice}" in + $2 ) + result="1" + ;; + $3 ) + result="2" + ;; +esac +} +################################################################################### +# Execution starts here. + +zenity --width=600 --height=200 --info --text "You need an 8Gb or above external storage device (sdcard /pendrive) to continue" +selection_menu "Select Backup mode" "Incremental Backup" "Complete Backup" +case "${result}" in + "1" ) #Incremental + selection_menu "Incremental Backup options" "Continue with previous backup storage[if you have a previous incremental backup] " "Create a new backup by formating the storage" + case "${result}" in + "1" ) #continue rsync the storage + echo "rsync" + ;; + "2" ) #start new rsync + echo "start inc Bkup" + ;; + esac + ;;#Complete + "2" ) + echo "Do a complete Backup" + ;; +esac + |