In the autopackage installer, autopackage.tar.bz2 :
In the file install (in the archive's root) :
lines 83-87 :
case "$1" in
# Adjust prefix location
--prefix)
prefix="$1"
shift
;;
Should be :
case "$1" in
# Adjust prefix location
--prefix)
prefix="$2"
shift 2
;;
You should change $1 to $2 and change shift to shift 2 on line 87. At the moment, using this option has the effect of assigning "--prefix" to the prefix variable, which breaks the whole installation process.
Also, you should check that the prefix matches an existing directory, if not ask the user for confirmation / output a wrning and mkdir -p it :
forceprefix=0
while [ $# -gt 0 ]
do
case "$1" in
# Accept non-existing prefix
--force-prefix)
forceprefix=1
shift
;;
# Adjust prefix location
--prefix)
prefix="$2"
shift 2
;;
...
esac
doce
if [ ! -d "$prefix" ]; then
if [ $forceprefix != 1 ]; then
echo "ERROR : $prefix isn't a directory ! Use --force-prefix to force."
exit 1
else
echo "Creating $prefix ..."
mkdir -p "$prefix"
fi
fi
I don't know if the variable forceprefix matches the naming convention in autopackage, you'd better check it out.
Last thing : on line 99 :
shift 1
Should be :
shift
(The 1 is useless and isn't provided for the --silence option, which could make someone trying to understand guess that "shift 1" shifts 2 arguments (1 extra) unlike "shift" which shifts 1 argument. That's what I thought for a few seconds.)