Skip to content

Commit

Permalink
moonscript support
Browse files Browse the repository at this point in the history
  • Loading branch information
git committed Mar 12, 2024
1 parent 7ab1c03 commit fff4219
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ Tested on version 16.04.7, SHA256SUMS: b23488689e16cad7a269eb2d3a3bf725d3457ee6b

``` sh
sudo apt-get update && sudo apt-get -y upgrade && sudo apt-get -y dist-upgrade
sudo apt-get install -y libspdlog-dev patchelf gawk m4 libx11-dev libxi-dev libxerces-c-dev libuchardet-dev libssh-dev libssl-dev libnfs-dev libneon27-dev libarchive-dev libpcre3-dev git cmake g++ libsmbclient-dev libwxgtk3.0-dev libluajit-5.1-dev luajit uuid-dev
sudo apt-get install -y libspdlog-dev patchelf gawk m4 libx11-dev libxi-dev libxerces-c-dev libuchardet-dev libssh-dev libssl-dev libnfs-dev libneon27-dev libarchive-dev libpcre3-dev git cmake g++ libsmbclient-dev libwxgtk3.0-dev libluajit-5.1-dev luajit uuid-dev luarocks
sudo luarocks install moonscript --lua-version=5.1
```

#### Download `autonomizer.sh` and `make_far_portable.sh`, run `make_far_portable.sh`
18 changes: 17 additions & 1 deletion make_far_portable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,18 @@ if [ -f "/usr/lib/x86_64-linux-gnu/libluajit-5.1.so.2.0.4" ]; then
cp --preserve=timestamps /usr/lib/x86_64-linux-gnu/libluajit-5.1.so.2.0.4 ./lib/libluajit-5.1.so
fi

if [ -f "/usr/local/lib/lua/5.1/lfs.so" ]; then
cp --preserve=timestamps /usr/local/lib/lua/5.1/lfs.so ./lib/
fi

if [ -f "/usr/local/lib/lua/5.1/lpeg.so" ]; then
cp --preserve=timestamps /usr/local/lib/lua/5.1/lpeg.so ./lib/
fi

if [ -d "/usr/local/share/lua/5.1" ]; then
cp -r --preserve=timestamps /usr/local/share/lua/5.1 ./
fi

cp ../../../autonomizer.sh .
chmod +x autonomizer.sh
./autonomizer.sh
Expand All @@ -38,10 +50,14 @@ rm lib/libstdc++.so.6
rm lib/libresolv.so.2
rm lib/librt.so.1

echo '#!/bin/sh' >far_run
echo 'LUA_PATH="$LUA_PATH;$(dirname $(realpath $0))/5.1/?.lua;$(dirname $(realpath $0))/5.1/?/init.lua;" LUA_CPATH="$LUA_CPATH;$(dirname $(realpath $0))/lib/?.so;" "$(dirname $(realpath $0))/far2m" "$@"' >>far_run
chmod +x far_run

cd ..
mv install far_portable

chmod +x ../../makeself/makeself.sh
../../makeself/makeself.sh --keep-umask --nocomp far_portable far_portable.run far2m ./far2m
../../makeself/makeself.sh --keep-umask --nocomp far_portable far_portable.run far2m ./far_run
chmod 755 far_portable.run
mv far_portable.run ../../far

0 comments on commit fff4219

Please sign in to comment.