-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcdgen
executable file
·110 lines (98 loc) · 1.82 KB
/
cdgen
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#!/bin/bash -e
. 00-common
function hiba (){
echo $1
helptext=$(cat $DATADIR/help.txt)
printf "\e[0;31m $helptext\n"
exit
}
for i in "$@"
do
case $i in
UBK*)
DIST="$i"
DISTVER="${i/UBK/}"
export DIST=$i
export DISTVER="${i/UBK/}"
shift
;;
ubk*)
DIST="${i^^}"
DISTVER="${i/UBK/}"
export DIST=$i
export DISTVER="${i/UBK/}"
shift
;;
gnome|mate|xfce|kde|lxqt|lxde|lumina)
DESKTOP="$i"
shift
;;
--help)
hiba
shift
;;
*)
hiba
;;
esac
done
if [ ! -d data/$DIST ];then
hiba "Nem kezelt disztribúció: $DIST!"
fi
if [ -n "$DESKTOP" ]; then
case $DESKTOP in
gnome)
export DESKTOP=gnome
;;
mate)
export DESKTOP=mate
;;
xfce)
export DESKTOP=xfce
;;
kde)
export DESKTOP=kde
;;
lxqt)
export DESKTOP=lxqt
;;
lxde)
export DESKTOP=lxde
;;
lumina)
export DESKTOP=lumina
;;
*)
hiba "Hibás desktop paraméter, mely most a $2!"
printf "\e[0;31m $helptext\n"
exit
;;
esac
else
export DESKTOP=mate
fi
if [ -f packages_cd.txt ]; then
rm -f packages_cd.txt
fi
rm -f apt.log
rm -f installed_packages*.txt
mkdir -p $WORKDIR
isoarch="amd64"
export UHU_RELEASE_FULL="UHU-Linux ${DIST}-${DESKTOP^^}-${ISODATE//-}-$isoarch"
export release_file="${UHU_RELEASE_FULL// /-}"
cp "$DATADIR"/$DIST/packages.cd.base.txt $BASEDIR/packages_cd.txt.tmp
cat "$DATADIR"/$DIST/packages.$DESKTOP.txt >> $BASEDIR/packages_cd.txt.tmp
cat $BASEDIR/packages_cd.txt.tmp | grep -v '^-' >> $BASEDIR/packages_cd.txt
rm -f $BASEDIR/packages_cd.txt.tmp
export apt_sourcelist="-o Dir::Etc::SourceList="$DATADIR"/$DIST/sources.list"
for i in [0-9][0-9]-*; do
if [ -x "$i" ]; then
case "$i" in
*~|*.orig|*.rej|*.skip)
;;
*)
"./$i"
;;
esac
fi
done