-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.sh
executable file
·66 lines (66 loc) · 1.67 KB
/
build.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
64
65
66
#!/bin/bash
VERSION=$(cat DEBIAN/control | grep 'Version: ' | sed 's/Version: //g')
PAK=$(cat DEBIAN/control | grep 'Package: ' | sed 's/Package: //g')
ARCH=$(cat DEBIAN/control | grep 'Architecture: '| sed 's/Architecture: //g')
FOLDER="$PAK\_$VERSION\_$ARCH"
FOLDER=$(echo "$FOLDER" | sed 's/\\//g')
mkdir ../"$FOLDER"
##############################################################
# #
# #
# COMPILE ANYTHING NECSSARY HERE #
# #
# #
##############################################################
cd usr/share/drauger-welcome
g++ -Wall -m64 -o "log-out" "log-out.cxx"
cd ../../..
##############################################################
# #
# #
# REMEMBER TO DELETE SOURCE FILES FROM TMP #
# FOLDER BEFORE BUILD #
# #
# #
##############################################################
if [ -d bin ]; then
cp -R bin ../"$FOLDER"/bin
fi
if [ -d etc ]; then
cp -R etc ../"$FOLDER"/etc
fi
if [ -d usr ]; then
cp -R usr ../"$FOLDER"/usr
fi
if [ -d lib ]; then
cp -R lib ../"$FOLDER"/lib
fi
if [ -d lib32 ]; then
cp -R lib32 ../"$FOLDER"/lib32
fi
if [ -d lib64 ]; then
cp -R lib64 ../"$FOLDER"/lib64
fi
if [ -d libx32 ]; then
cp -R libx32 ../"$FOLDER"/libx32
fi
if [ -d sbin ]; then
cp -R sbin ../"$FOLDER"/sbin
fi
if [ -d var ]; then
cp -R var ../"$FOLDER"/var
fi
if [ -d opt ]; then
cp -R opt ../"$FOLDER"/opt
fi
if [ -d srv ]; then
cp -R srv ../"$FOLDER"/srv
fi
cp -R DEBIAN ../"$FOLDER"/DEBIAN
cd ..
#delete stuff here
rm "$FOLDER"/usr/share/drauger-welcome/log-out.cxx
rm drauger-welcome/usr/share/drauger-welcome/log-out
#build the shit
dpkg-deb --build "$FOLDER"
rm -rf "$FOLDER"