Skip to content
This repository was archived by the owner on Jun 21, 2020. It is now read-only.

Commit f39f36e

Browse files
committed
initial release
1 parent 1096bfc commit f39f36e

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

email-bkup

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/bin/bash
2+
3+
#winlink email backup
4+
#20200120 km4ack
5+
6+
WHO=$(whoami)
7+
CALL=$(cat $HOME/.wl2k/config.json | grep mycall | head -1 | sed 's/"mycall"://' | sed 's/"//g' | sed 's/,//')
8+
BKUPTIME=$(date +%Y%d%m-%H%M)
9+
10+
clear;echo;echo;
11+
echo "Please insert external disk/thumb drive now"
12+
read -n 1 -s -r -p "Press any key to continue"
13+
14+
AVAILDISK=$(ls /media/$WHO/)
15+
16+
clear;echo;echo;
17+
echo "Disk(s) Available";echo
18+
echo $AVAILDISK
19+
echo;echo
20+
read -p "Enter first 3 characters of disk you wish to use? " ANS
21+
BKUPTO=$(echo $AVAILDISK | grep -i $ANS)
22+
echo;echo;
23+
echo "Use the following drive?"
24+
echo $BKUPTO
25+
read -p "Is this correct? y/n " ANS1
26+
if [ $ANS1 = 'y' ]
27+
then
28+
echo "Backing up email....please standby"
29+
mkdir -p /media/$WHO/$BKUPTO/$BKUPTIME
30+
cp -r $HOME/.wl2k/mailbox/$CALL /media/$WHO/$BKUPTO/$BKUPTIME > /dev/null 2>&1
31+
echo "Backup Complete"
32+
sleep 2
33+
fi
34+
35+
exit 0

0 commit comments

Comments
 (0)