+
+if [[ $1 == *"/"* ]]; then
+ # Path to directory which may be outside this repo:
+ if [ ! -d $1 ]; then echo "ERROR: '$1' seems to be a path but is not a directory"; exit 1; fi
+ export TERMUX_PKG_BUILDER_DIR=`realpath $1`
+else
+ # Package name:
+ export TERMUX_PKG_BUILDER_DIR=$TERMUX_SCRIPTDIR/packages/$TERMUX_PKG_NAME
+fi