-
Notifications
You must be signed in to change notification settings - Fork 0
/
export.sh
executable file
·64 lines (48 loc) · 934 Bytes
/
export.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
#!/bin/bash
#
# Export the Documentation to USB Key
#
# Andrew Cutler, 2008-05-02
#
# Source global config
. config.sh
DATE=`date`
ismounted() {
DIR=$1
if [ -d $DIR ];
then
A=`df $DIR | grep $DIR 2>/dev/null`;
if [ "$A" ];
then
return 0;
else
return 1;
fi
else
return 1;
fi
}
doexport() {
./make.sh
echo;
echo "*";
echo "* Exporting a copy of documentation to $USBDEVICE.";
echo "*";
echo;
./clean.sh ;
unix2dos autorun.inf ;
unix2dos README.txt ;
rsync -av --force --delete --exclude=tmp ./* $USBDEVICE ;
echo "Documentation Exported on: $DATE" >> $USBDEVICE/README.txt
echo;
echo "*";
echo "* Done.";
echo "*";
echo;
}
if ismounted $USBDEVICE;
then
doexport;
else
echo "Please mount USB Device";
fi