HinzugefĆ¼gt:
[ipfire-2.x.git] / src / scripts / make-packages.sh
1 #!/bin/bash
2 ########################################################
3 ## ##
4 ## Make packages ##
5 ## ##
6 ## (c) www.ipfire.org - GPL v2 ##
7 ## ##
8 ########################################################
9 echo "`date -u '+%b %e %T'`: Packing $1" | tee -a $LOGFILE
10 cd / && mkdir -p /paks/$1
11
12 ## Copy install.sh/uninstall.sh to pak-dir and make executeable
13 #
14 cp -f /usr/src/src/paks/$1/{,un}install.sh /paks/$1
15 chmod 755 /paks/$1/{,un}install.sh
16
17 tar cvfz /paks/$1/files.tgz --files=/usr/src/src/paks/$1/ROOTFILES --exclude='#*'
18
19 tar cvfz /paks/$1/conf.tgz --files=/usr/src/src/paks/$1/CONFFILES --exclude='#*'
20 cd /paks/$1 && tar cvfz ../$2.tar.gz files.tgz conf.tgz install.sh uninstall.sh && cd ..
21
22 md5sum $2.tar.gz >> $2.tar.gz.md5
23
24 ## Clean up!
25 #
26 rm -rf /paks
27
28 exit 0