Run locally using a local user directory for testing

This commit is contained in:
Francesco Abbate 2020-12-07 17:42:50 +01:00
parent ebaa2b4f26
commit 48ad8a8392
1 changed files with 4 additions and 2 deletions

View File

@ -9,6 +9,8 @@ else
datadir="$rundir/share/lite-xl"
fi
userdir="$rundir/.lite"
if [ "$#" -lt 1 ]; then
echo "usage: $0 <build-dir>"
exit 1
@ -16,7 +18,7 @@ fi
builddir="$1"
rm -fr "$rundir"
mkdir -p "$bindir" "$datadir"
mkdir -p "$bindir" "$datadir" "$userdir"
if [ -f "$builddir/src/lite" ]; then
cp "$builddir/src/lite" "$bindir"
elif [ -f "$builddir/src/lite.exe" ]; then
@ -28,4 +30,4 @@ fi
for module_name in core plugins colors fonts; do
cp -r "data/$module_name" "$datadir"
done
exec "$bindir/lite" "${@:2}"
HOME="$userdir" USERPROFILE="$userdir" exec "$bindir/lite" "${@:2}"