# HG changeset patch # User Pascal Bellard # Date 1423126437 0 # Node ID 66ddc0b26133c3e3d9d7d61015c21c60f15b296d # Parent 05f37837d344ed56e847bc1f8dd6da040fc2eda9 tazbian: non-slitaz support diff -r 05f37837d344 -r 66ddc0b26133 rpi/tazbian --- a/rpi/tazbian Fri Dec 05 00:40:18 2014 -0500 +++ b/rpi/tazbian Thu Feb 05 08:53:57 2015 +0000 @@ -1,6 +1,6 @@ #!/bin/sh # -# (C) 2014 SliTaz GNU/Linux - GPL2 +# (C) 2014-2015 SliTaz GNU/Linux - GPL2 # # Creates a Debian package to install SliTaz on a Raspbian without # repartitioning. @@ -10,7 +10,36 @@ [ $(id -u) -ne 0 ] && echo "Must be root. Abort." && exit 1 +tazpkg() +{ + if [ -x /usr/bin/tazpkg ]; then + /usr/bin/tazpkg "$@" + exit $? + fi + [ "$1" == "get-install" ] && echo "abort: can't find $2" && exit 1 + mkdir -p tazpkg$$ + cd tazpkg$$ + cpio -i < ../$2 + gunzip fs.cpio.gz 2> /dev/null + [ -s fs.cpio ] || unlzma fs.cpio.lzma + cpio -idmu < fs.cpio + cd .. + sh <> ${3#--root=}/var/lib/tazpkg/installed.md5 + rm -rf tazpkg$$ +} + +[ -x /usr/bin/ar -o -x /bin/ar ] || tazpkg get-install binutils CURDIR=$PWD +EXE=$(cd $(dirname $0); pwd)/$(basename $0) TMPDIR=/tmp/rasp$$ mkdir -p $TMPDIR cd $TMPDIR @@ -103,6 +132,7 @@ rm -f $LIVE/$file fi done +cp $EXE $BASE/root/ ( cd $BASE/ ; find -type d ) | while read dir; do rmdir $LIVE/$dir 2> /dev/null done @@ -126,7 +156,7 @@ Installed-Size: $(($(du -ks fs | cut -f1) + $LIVESZ)) Section: miscellaneous Priority: optional -Homepage: http://arm.slitaz.org/ +Homepage: http://arm.slitaz.org/rpi/ Description: Tiny Linux distribution with multi boot features SliTaz can run fully in RAM or can be installed on the SD card in a subdirectory of your Raspbian (example /$DESTDIR). @@ -231,7 +261,6 @@ tar czf control.tar.gz md5sums control postinst prerm rm -rf fs/$DESTDIR/* cd fs ; tar czf ../data.tar.gz . ; cd .. -[ -x /usr/bin/ar ] || tazpkg get-install binutils ar rcs slitaz-$VERSION-1_armhf.deb debian-binary control.tar.gz data.tar.gz mv slitaz-$VERSION-1_armhf.deb $CURDIR cd $CURDIR