---
Hello uxn maintainers! This patch adds the PREFIX environment variable,
which specifies the installation path for built binaries. Defaults to
`~/bin` otherwise.
build.sh | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/build.sh b/build.sh
index 803f3bc..c24cee9 100755
--- a/build.sh
@@ -105,8 +105,10 @@ ${CC} ${CFLAGS} ${CORE} src/devices/system.c src/devices/file.c src/devices/date
if [ $install = 1 ]
then
- echo "Installing in $HOME/bin"
- cp bin/uxnemu bin/uxnasm bin/uxncli $HOME/bin/
+ if [ -z $PREFIX ]; then PREFIX=$HOME/bin; fi
+ if [ ! -d $PREFIX ]; then mkdir -p $PREFIX; fi
+ echo "Installing in $PREFIX"
+ cp bin/uxnemu bin/uxnasm bin/uxncli $PREFIX
fi
echo "Assembling(launcher).."
--
2.38.1