You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
1.1 KiB
29 lines
1.1 KiB
#!/bin/sh -e
|
|
# A hacky script to generate .t?z files using satellites.
|
|
# It's a fairly simple wrapper to astronaut, that generates a pkgtools package at the end.
|
|
|
|
# This may also serve as an example on how you can wrap astronaut to package in any format.
|
|
|
|
_fakeroot="$(command -v fakeroot)"
|
|
|
|
if [ ! "$_fakeroot" -a "$(id -u)" != "0" ]; then
|
|
echo "This script has to be run as root, or you need fakeroot installed." 1>&2
|
|
exit 1
|
|
fi
|
|
|
|
_topdir=$PWD
|
|
_astronaut="$(dirname "$0")/astronaut"
|
|
[ ! -f "$_astronaut" ] && _astronaut="astronaut"
|
|
|
|
_nuke_dir_install=true
|
|
|
|
. "$_astronaut"
|
|
|
|
# Gzip man and info pages
|
|
[ -d "$dir_install/$dir_prefix/$dir_mandir" ] && gzip -9 -r "$dir_install/$dir_prefix/$dir_mandir"
|
|
[ -d "$dir_install/$dir_prefix/$dir_infodir" ] && gzip -9 -r "$dir_install/$dir_prefix/$dir_infodir"
|
|
|
|
# _dir_pkgtools should be set from a configuration file (e.g. ~/.astronaut.conf), and points to wherever you want your packages to be placed.
|
|
[ "$dir_wrapper_pkgtools" ] && mkdir -p "$dir_wrapper_pkgtools" || dir_wrapper_pkgtools="$_topdir"
|
|
cd "$dir_install"
|
|
PATH=$PATH:/sbin "$_fakeroot" makepkg -l y -c n "$dir_wrapper_pkgtools/$name-$version-$(uname -m)-astro.tgz"
|
|
|