23 lines
445 B
Bash
23 lines
445 B
Bash
#!/bin/bash
|
|
|
|
if [ "$1" = "-h" ]
|
|
then
|
|
echo "system-backup <option> [USB Dir]"
|
|
echo
|
|
echo "If no options are specified it will use default"
|
|
echo
|
|
echo "Options:"
|
|
echo
|
|
echo "-d [USB Dir] [directory to back up]"
|
|
echo "-n use SCP instead of USB"
|
|
echo
|
|
exit 0
|
|
fi
|
|
|
|
if [ "$1" = "-d" ]
|
|
then
|
|
sudo mount /dev/sd
|
|
mv "$2"
|
|
sudo screen -dmS backup -t backup
|
|
exit 0
|
|
fi |