12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- #!/bin/bash
- # Wrapper for building freon extension into a package.
- # Version: 0.0.1
- # (C) Chris Dorman, 2020 GPLv3+
- # work directories
- tmpdir="`pwd`/pkg"
- srcdir="`pwd`/pkgsrc"
- rootdir="`pwd`/src/rootfs"
- freondir="/freon"
- pkgdir="`pwd`/pkgs"
- if [ ! -d "$tmpdir" ]; then
- echo "Warning: tmp directory not found, creating."
- mkdir $tmpdir > /dev/null 2>&1
- fi
- if [ ! -d "$pkgdir" ]; then
- echo "Warning: tgz directory not found, creating."
- mkdir $pkgdir > /dev/null 2>&1
- fi
- case $1 in
- * ) echo "Building $1.tgz..."
-
- if [ -d $tmpdir ]; then
- rm -rf $tmpdir
- fi
-
- mkdir $tmpdir
- cd $tmpdir/..
-
- if [ -f "deps/${1}.exec" ]; then
- cp deps/$1.exec $tmpdir/execute.sh
- fi
- cp -av $freondir $tmpdir/.
-
- cd $tmpdir
-
- tar -czf $1.tgz *
-
- cp $1.tgz $pkgdir/$1.tgz
-
- rm -rf $tmpdir
-
- echo "Done!"
- ;;
- esac
|