36 lines
506 B
Bash
Executable file
36 lines
506 B
Bash
Executable file
#!/bin/bash
|
|
|
|
COMMAND=$1
|
|
|
|
source /lib/sapphrc/sapphrc-functions
|
|
source /lib/sapphrc/sapphrc-font
|
|
|
|
inex="include"
|
|
|
|
case $COMMAND in
|
|
add|remove )
|
|
shift 1;;&
|
|
add )
|
|
action="add";;
|
|
remove )
|
|
action="remove";;
|
|
* )
|
|
usage
|
|
exit 1;;
|
|
esac
|
|
|
|
while getopts 'hp:' flag; do
|
|
case "${flag}" in
|
|
p ) echo "${OPTARG}";shift 2;profile_name="${OPTARG}";;&
|
|
h ) usage;exit 1 ;;
|
|
esac
|
|
done
|
|
|
|
validate_backupdir
|
|
|
|
case "${action}" in
|
|
add )
|
|
inex_func "$@";;
|
|
remove )
|
|
inex_rm "$@";;
|
|
esac
|