forked from gapan/iso-creation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
02-arrangepackages.sh
executable file
·111 lines (92 loc) · 2.17 KB
/
02-arrangepackages.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
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/sh
if [ "$UID" -eq "0" ]; then
echo "Don't run this script as root"
exit 1
fi
if [ ! -f ARCH ]; then
echo "No ARCH file."
exit 1
else
export ARCH=`cat ARCH`
fi
rm -rf iso
rm -rf temp
mkdir -p iso/salix/{aaa,kernels,core,settings}
if [[ "$ARCH" == "x86_64" ]]; then
mkdir -p iso/salix/efi
fi
if [ -f lists/BASIC ]; then
if [[ "$ARCH" == "x86_64" ]]; then
mkdir -p iso/salix/efi-gui
fi
mkdir -p iso/salix/basic
fi
if [ -f lists/FULL ]; then
mkdir -p iso/salix/full
fi
mkdir -p temp
find /var/slapt-get -name "*.t[gx]z" -exec cp {} temp/ \;
for i in `cat lists/AAA`; do
find temp/ | grep /$i- | sed "/$i-.*-.*-.*-.*/d" >> temp/AAALIST
done
for i in `cat lists/KERNEL`; do
find temp/ | grep /$i- | sed "/$i-.*-.*-.*-.*/d" >> temp/KERNELLIST
done
for i in `cat lists/CORE`; do
find temp/ | grep /$i- | sed "/$i-.*-.*-.*-.*/d" >> temp/CORELIST
done
if [[ "$ARCH" == "x86_64" ]]; then
for i in `cat lists/EFI`; do
find temp/ | grep /$i- | sed "/$i-.*-.*-.*-.*/d" >> temp/EFILIST
done
fi
if [ -f lists/BASIC ]; then
for i in `cat lists/BASIC`; do
find temp/ | grep /$i- | sed "/$i-.*-.*-.*-.*/d" >> temp/BASICLIST
done
if [[ "$ARCH" == "x86_64" ]]; then
for i in `cat lists/EFI-GUI`; do
find temp/ | grep /$i- | sed "/$i-.*-.*-.*-.*/d" >> temp/EFIGUILIST
done
fi
fi
if [ -f lists/FULL ]; then
for i in `cat lists/FULL`; do
find temp/ | grep /$i- | sed "/$i-.*-.*-.*-.*/d" >> temp/FULLLIST
done
fi
for i in `cat lists/SETTINGS`; do
find temp/ | grep /$i- | sed "/$i-.*-.*-.*-.*/d" >> temp/SETTINGSLIST
done
for i in `cat temp/AAALIST`; do
mv $i iso/salix/aaa/
done
for i in `cat temp/KERNELLIST`; do
mv $i iso/salix/kernels/
done
for i in `cat temp/CORELIST`; do
mv $i iso/salix/core/
done
if [[ "$ARCH" == "x86_64" ]]; then
for i in `cat temp/EFILIST`; do
mv $i iso/salix/efi/
done
fi
if [ -f lists/BASIC ]; then
for i in `cat temp/BASICLIST`; do
mv $i iso/salix/basic/
done
if [[ "$ARCH" == "x86_64" ]]; then
for i in `cat temp/EFIGUILIST`; do
mv $i iso/salix/efi-gui/
done
fi
fi
if [ -f lists/FULL ]; then
for i in `cat temp/FULLLIST`; do
mv $i iso/salix/full/
done
fi
for i in `cat temp/SETTINGSLIST`; do
mv $i iso/salix/settings/
done