forked from LK8000/LK8000
-
Notifications
You must be signed in to change notification settings - Fork 0
/
savelk.sh
executable file
·64 lines (55 loc) · 1.36 KB
/
savelk.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/bash
# Saves the executables for later use
# by Paolo
PLACE=/lk/SAVED
NOW=`date +%y%m%d_%H%M`
echo "SAVING LK EXECUTABLES. Press Enter to continue."
read a
test -d $PLACE || {\
echo
echo -n "Folder $PLACE does not exist. Create [y/n]? "
read a
case $a in
y|Y) ;;
n|N|*) echo "NOT SAVED"; exit ;;
esac
mkdir $PLACE || {\
echo "We got problems!"
echo "CANNOT CREATE FOLDER <$PLACE> . NOT SAVED."
exit
}
mkdir $PLACE/PC
mkdir $PLACE/PNA
mkdir $PLACE/LINUX
mkdir $PLACE/KOBO
echo "Folder <$PLACE> created."
}
test -r LK8000-LINUX && {\
test -d $PLACE/LINUX || {\
echo "NO LINUX SUBFOLDER! ABORTED."; exit
}
cp LK8000-LINUX $PLACE/LINUX/$NOW
echo "Linux executable saved as <$PLACE/LINUX/$NOW>"
}
test -r LK8000-PC.exe && {\
test -d $PLACE/PC || {\
echo "NO PC SUBFOLDER! ABORTED."; exit
}
cp LK8000-PC.exe $PLACE/PC/${NOW}.exe
echo "PC executable saved as <$PLACE/PC/${NOW}.exe>"
}
test -r LK8000-PNA.exe && {\
test -d $PLACE/PNA || {\
echo "NO PNA SUBFOLDER! ABORTED."; exit
}
cp LK8000-PNA.exe $PLACE/PNA/${NOW}.exe
echo "PNA executable saved as <$PLACE/PNA/${NOW}.exe>"
}
test -r KoboRoot.tgz && {\
test -d $PLACE/KOBO || {\
echo "NO KOBO SUBFOLDER! ABORTED."; exit
}
cp KoboRoot.tgz $PLACE/KOBO/${NOW}.tgz
echo "KOBO tgz saved as <$PLACE/KOBO/${NOW}.tgz>"
}
echo All done. Goodbye.