-
Notifications
You must be signed in to change notification settings - Fork 5
/
Backup.sh
60 lines (60 loc) · 1.06 KB
/
Backup.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
if [ ! -d "backup" ]; then
mkdir backup
cd backup
mkdir tools
cd tools
mkdir ring2exe
cp ../../tools/ring2exe/ring2exe.ring ring2exe
cd ..
mkdir libraries
cd libraries
mkdir stdlib
cp ../../libraries/stdlib/stdlibcore.ring stdlib
cd ..
mkdir lib
cp ../lib/libringstatic.a lib
if [ -f ../lib/libring.dylib ];
then
cp ../lib/libring.dylib lib
fi
if [ -f ../lib/libring.so ];
then
cp ../lib/libring.so lib
fi
mkdir bin
cp ../bin/ring bin
cp ../bin/ring2exe bin
cp ../bin/ringpm bin
if [ -f ../lib/libring.dylib ];
then
cp ../bin/folder2qrc bin
cp ../bin/ringrepl bin
fi
cd ..
else
cd backup
cp tools/ring2exe/ring2exe.ring ../tools/ring2exe
cp libraries/stdlib/stdlibcore.ring ../libraries/stdlib
cp lib/libringstatic.a ../lib
if [ -f lib/libring.dylib ];
then
cp lib/libring.dylib ../lib
fi
if [ -f lib/libring.so ];
then
cp lib/libring.so ../lib
fi
cp bin/ring ../bin
chmod +x ../bin/ring
cp bin/ring2exe ../bin
chmod +x ../bin/ring2exe
cp bin/ringpm ../bin
chmod +x ../bin/ringpm
if [ -f lib/libring.dylib ];
then
cp bin/folder2qrc ../bin
cp bin/ringrepl ../bin
fi
cd ..
rm bin/sign2a
fi