-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path2simplecdd.sh
executable file
·41 lines (37 loc) · 1.16 KB
/
2simplecdd.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
#!/bin/bash
# ---------------------------------------------------------------------------- #
## \file 2simplecdd.sh
## \author Sebastien Beaugrand
## \sa http://beaugrand.chez.com/
## \copyright CeCILL 2.1 Free Software license
# ---------------------------------------------------------------------------- #
if [ -z "$2" ]; then
echo "Usage: `basename $0` <simplecdd-...> <buildpackage-...>"
exit 1
fi
simplecdd=$1
lpkg=$2
source 0install.sh
# ---------------------------------------------------------------------------- #
# removeInMirror
# ---------------------------------------------------------------------------- #
removeInMirror()
{
pkg=$1
mirror=$2
if [ -d $mirror ]; then
pushd $mirror
reprepro remove stable $pkg >>$log 2>&1
popd
fi
}
# ---------------------------------------------------------------------------- #
# main
# ---------------------------------------------------------------------------- #
for i in `cat $lpkg/list.txt`; do
removeInMirror $i $bdir/$simplecdd/tmp/mirror
done
cd $simplecdd
make LPKG=$lpkg
stat -c '%s' $bdir/$simplecdd/images/debian-*-DVD-1.iso |\
awk '{ printf "%.1f GB\n",$0 / 1e9 }'