Fixes for packaging system that will read .postinstall script and run it
if exists. packit installs a package.
This commit is contained in:
parent
fc1582bb57
commit
f7132f1b1a
@ -42,6 +42,7 @@ usr: \
|
||||
/usr/bin/binsizes \
|
||||
/usr/bin/rotate \
|
||||
/usr/bin/floppysetup \
|
||||
/usr/bin/packit \
|
||||
/usr/bin/packme \
|
||||
/usr/bin/spell \
|
||||
/usr/bin/srccrc \
|
||||
@ -138,6 +139,9 @@ clean:
|
||||
/usr/bin/binsizes: binsizes.sh
|
||||
install -m 755 -c -o bin $? $@
|
||||
|
||||
/usr/bin/packit: packit.sh
|
||||
install -m 755 -c -o bin $? $@
|
||||
|
||||
/usr/bin/packme: packme.sh
|
||||
install -m 755 -c -o bin $? $@
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
PI=.postinstall
|
||||
|
||||
set -e
|
||||
|
||||
# No trailing slashes in the directory, because we want to base the
|
||||
@ -37,9 +39,8 @@ then echo "Error: No build script in $dir."
|
||||
fi
|
||||
|
||||
sh -e build
|
||||
cd /
|
||||
echo " * Building package"
|
||||
find / -cnewer $packagestart | grep -v "^$srcdir" | grep -v "^/dev" | grep -v "^/tmp" | grep -v "^/usr/tmp" | grep -v "^/usr/log" | grep -v "^/usr/adm" | grep -v "^/etc/utmp" | grep -v "^/usr/src" | pax -w -d | bzip2 >$tarbz
|
||||
( if [ -f $PI ]; then echo $PI; fi; find / -cnewer $packagestart | grep -v "^$srcdir" | grep -v "^/dev" | grep -v "^/tmp" | grep -v "^/usr/tmp" | grep -v "^/usr/log" | grep -v "^/usr/adm" | grep -v "^/etc/utmp" | grep -v "^/usr/src" ) | pax -w -d | bzip2 >$tarbz
|
||||
rm -f $packagestart $findlist $tarcmd
|
||||
binsizes normal
|
||||
mv $tarbz $here/$pdir
|
||||
|
38
commands/scripts/packit.sh
Normal file
38
commands/scripts/packit.sh
Normal file
@ -0,0 +1,38 @@
|
||||
#!/bin/sh
|
||||
|
||||
PI=.postinstall
|
||||
TMP=/usr/tmp
|
||||
|
||||
if [ "$#" -ne 1 ]
|
||||
then
|
||||
echo "Usage: $0 <package file>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
dir=`pwd`
|
||||
if [ "$1" = "-" ]
|
||||
then f=""
|
||||
else f=$dir/$1
|
||||
fi
|
||||
|
||||
set -e
|
||||
cd $TMP
|
||||
rm -f $PI
|
||||
|
||||
if [ -f $PI ]
|
||||
then echo "$PI is in $TMP, please remove it first."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f $f ]
|
||||
then echo "Couldn't find package $f."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cat $f | smallbunzip2 | pax -r -p e
|
||||
if [ -f $PI ]
|
||||
then
|
||||
sh -e $PI
|
||||
rm -f $PI
|
||||
fi
|
||||
|
@ -17,7 +17,7 @@ then for package in `isodir "$cddrive" $CDDIR | grep -i '\.tbz'`
|
||||
read y
|
||||
if [ "$y" = y ]
|
||||
then echo "Extracting $CDDIR/$package .."
|
||||
isoread "$cddrive" $CDDIR/$package | smallbunzip2 | pax -r -p e || echo "Extract failed."
|
||||
isoread "$cddrive" $CDDIR/$package | packit -
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user