but here it is
Code: Select all
#!/bin/sh
# by stemsee, copyright (C) 2020
[[ -z "$1" ]]||[[ -z "$2" ]] && timeout 7 echo "usage: multi-tzx2sfs 'package package' '/path/dirname' 'sfs compression'
multi-tzx2sfs \"python perl rust\" '/mnt/sda1/progs' 'xz'" && exit
add="$1"
dir="$2"
comp="$3"
[ -z "$comp" ] && comp="xz"
[[ -z "$1" ]]||[[ -z "$2" ]] && exit
[ ! -d "$dir" ] && mkdir -p "$dir"/tmp/sfs/install || echo "$dir exists" && xdg-open "$dir" && echo "press return to continue" && read dummy
slapt-get --clean
slapt-get -y -i --allow-unauthenticated --retry=3 --download-only --ignore-dep $add &
wait $!
[ $? -eq 1 ] && exit
ls /var/slapt-get/* | while read line; do [[ "$line" != package_data ]] && engrampa "$line" --extract-to="$dir" &>/dev/null
mv -f "$dir"/install/doinst.sh "$dir"/ && chmod 755 "$dir"/doinst.sh && exec "$dir"/doinst.sh && rm -f "$dir"/doinst.sh
cat "$dir"/install/slack-desc >> "$dir"/tmp/sfs/install/slack-desc
cat "$dir"/install/slack-required >> "$dir"/tmp/sfs/install/slack-required
cat "$dir"/install/slack-desc | awk '{$1=""; print $0}' >> "$dir"/tmp/sfs/msg
rm -rf "$dir"/install
done
sort --unique -o "$dir"/tmp/sfs/install/slack-required "$dir"/tmp/sfs/install/slack-required
mksquashfs "$dir" "$dir".sfs -comp "$comp"