Code: Select all
#!/bin/sh
DEB=`Xdialog --title "Select file" --wrap --fselect *.deb 0 0 2>&1`
if [ -e "$DEB" ]; then
for i in "$DEB"
do
FOLDR=$(echo $i|sed 's/\.deb$//')
done
mkdir "$FOLDR"
cp "$DEB" "$FOLDR"
cd "$FOLDR"
DEB=`ls | grep ".deb"`
undeb "$DEB"
rm "$DEB"
FOLDR=`basename $(echo "$FOLDR")`
echo "PETMENUDESCR=''" > "$FOLDR.pet.specs"
echo "PETOFFICIALDEPS=''" >> "$FOLDR.pet.specs"
echo "PETREGISTER='yes'" >> "$FOLDR.pet.specs"
cd ..
tar -cf "$FOLDR.tar" "$FOLDR"
gzip "$FOLDR.tar"
tgz2pet "$FOLDR.tar.gz"
rm -R -f "$FOLDR"
rox
fi