Also adding a shell script that will copy the results of a test build to a location from where it can be run.
48 lines
973 B
Bash
48 lines
973 B
Bash
#!/bin/sh
|
|
|
|
### Run this like: sh install.sh <path to install to>
|
|
###
|
|
### For example:
|
|
### sh install.sh /usr/local
|
|
### sh install.sh /home/testuser
|
|
|
|
set -e
|
|
|
|
if [ x"$1" = "x" ]; then
|
|
echo "Error: install target not specified"
|
|
exit 1
|
|
fi
|
|
|
|
if [ ! -d "$1"/bin ]; then
|
|
echo "Error: $1/bin does not exist"
|
|
exit 1
|
|
fi
|
|
|
|
if [ ! -d "$1"/share ]; then
|
|
echo "Error: $1/share does not exist"
|
|
exit 1
|
|
fi
|
|
|
|
if [ ! -d "$1"/etc ]; then
|
|
echo "Error: $1/etc does not exist"
|
|
exit 1
|
|
fi
|
|
|
|
umask 003
|
|
|
|
bazel-7.4.1 build -c dbg --define=INSTALL_PREFIX="$1" //wmaker //WindowMaker:all
|
|
|
|
OUTDIR="$(dirname "$0")"/bazel-out/k8-dbg/bin
|
|
|
|
cp "$OUTDIR"/wmaker/wmaker "$1"/bin/wmaker
|
|
|
|
rm -rf "$1"/etc/GNUstep/Defaults
|
|
mkdir -p "$1"/etc/GNUstep/Defaults
|
|
tar cf - -C "$OUTDIR"/WindowMaker Defaults \
|
|
| tar xf - -C "$1"/etc/GNUstep
|
|
|
|
rm -rf "$1"/share/WindowMaker
|
|
mkdir -p "$1"/share/WindowMaker
|
|
tar cf - -C "$OUTDIR"/WindowMaker/share WindowMaker \
|
|
| tar xf - -C "$1"/share
|