-newupdate)
- # create structure for $VERSION update
- if [ ! -f "updates/$VERSION" ]; then
- mkdir -p updates/$VERSION
- cd updates/$VERSION
- touch information
- echo 'etc/issue' > ROOTFILES.alpha-$VERSION
- echo 'etc/issue' > ROOTFILES.i386-$VERSION
- echo 'patch.tar.gz' > .cvsignore
- sed -e "s+^UPGRADEVERSION.*$+UPGRADEVERSION=$VERSION+" $BASEDIR/src/scripts/updatesetup > setup
- chmod 755 setup
- cd ..
- echo "Adding directory $VERSION to cvs"
- cvs add $VERSION
- echo "Adding files to cvs"
- cvs add $VERSION/ROOTFILES.alpha-$VERSION \
- $VERSION/ROOTFILES.i386-$VERSION \
- $VERSION/information \
- $VERSION/setup \
- $VERSION/.cvsignore
+newpak)
+ # create structure for a new package
+ echo -e "Name of the new package: $2"
+ if [ ! -f "lfs/$2" ]; then
+ echo "`date -u '+%b %e %T'`: Creating directory src/paks/$2"
+ mkdir -p src/paks/$2
+ cd src/paks/$2
+ echo "`date -u '+%b %e %T'`: Creating files"
+ cp $BASEDIR/lfs/postfix $BASEDIR/lfs/$2
+
+ touch ROOTFILES
+ touch CONFFILES
+ touch {,un}install.sh
+ ## install.sh
+ echo '#!/bin/bash' > install.sh
+ echo '#' >> install.sh
+ echo '#################################################################' >> install.sh
+ echo '# #' >> install.sh
+ echo '# This file belongs to IPFire Firewall - GPLv2 - www.ipfire.org #' >> install.sh
+ echo '# #' >> install.sh
+ echo '#################################################################' >> install.sh
+ echo '#' >> install.sh
+ echo '# Extract the files' >> install.sh
+ echo 'tar xfz files.tgz -C /' >> install.sh
+ echo 'cp -f ROOTFILES /opt/pakfire/installed/ROOTFILES.$2' >> install.sh
+ ## uninstall.sh
+ echo '#!/bin/bash' > uninstall.sh
+ echo '#################################################################' >> uninstall.sh
+ echo '# #' >> uninstall.sh
+ echo '# This file belongs to IPFire Firewall - GPLv2 - www.ipfire.org #' >> uninstall.sh
+ echo '# #' >> uninstall.sh
+ echo '#################################################################' >> uninstall.sh
+ echo '#' >> uninstall.sh
+ echo '# Delete the files' >> uninstall.sh
+ echo '## Befehl fehlt noch' >> uninstall.sh
+ echo 'rm -f /opt/pakfire/installed/ROOTFILES.$2' >> uninstall.sh
+ echo "`date -u '+%b %e %T'`: Adding files to SVN"
+ cd - && svn add lfs/$2 && svn add src/paks/$2
+
+ echo -n "Do you want to remove the folders? [y/n]"
+ read REM
+ if [ "$REM" == "y" ]; then
+ echo "Removing the folders..."
+ svn del src/paks/$2 --force
+ else
+ echo "Folders are kept."
+ fi