aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authors-ol <s-ol@users.noreply.github.com>2020-04-17 14:50:18 +0000
committers-ol <s-ol@users.noreply.github.com>2020-04-17 14:50:18 +0000
commita4e0a27225c889bf3b2ddcc850374af00ac2a57d (patch)
treed1e64c0e03ca55019d1d21042eb8aa447228d173
parentmvoe rockspecs to dist/ (diff)
downloadalive-a4e0a27225c889bf3b2ddcc850374af00ac2a57d.tar.gz
alive-a4e0a27225c889bf3b2ddcc850374af00ac2a57d.zip
add some windows dist pieces
-rw-r--r--dist/.gitignore2
-rwxr-xr-xdist/build-win.sh60
-rwxr-xr-xdist/fix-lua-win.sh16
-rwxr-xr-xdist/release.sh (renamed from dist/release)0
4 files changed, 78 insertions, 0 deletions
diff --git a/dist/.gitignore b/dist/.gitignore
new file mode 100644
index 0000000..7d0e917
--- /dev/null
+++ b/dist/.gitignore
@@ -0,0 +1,2 @@
+*.zip
+deps
diff --git a/dist/build-win.sh b/dist/build-win.sh
new file mode 100755
index 0000000..bfa5de0
--- /dev/null
+++ b/dist/build-win.sh
@@ -0,0 +1,60 @@
+#!/bin/sh
+
+VERSION="$1"
+BUNDLE="alive-$VERSION-win"
+
+set -e
+
+if [ -d "dist/$BUNDLE.zip" ]; then
+ echo "dist/$BUNDLE.zip already exists!"
+ exit 2
+fi
+
+git archive "$VERSION:" -o "dist/$BUNDLE.zip" --prefix "$BUNDLE/alive/"
+
+cd dist
+unzip "$BUNDLE.zip"
+cd "$BUNDLE"
+
+cp -r ../docs .
+mv alive/hello.alv .
+rm -rf docs/*.md docs/*.ltp docs/gen
+rm -rf alive/dist
+
+unzip ../lua-win.zip
+
+cat <<EOF >copilot.bat
+@echo off
+setlocal
+set PATH=%PATH%;%~dp0\lua\lua\bin
+set LUA_PATH=%LUA_PATH%;%~dp0\alive\?.lua;%~dp0\alive\?\init.lua
+moon %~dp0\alive\init.moon %*
+exit /b %ERRORLEVEL%
+EOF
+
+cat <<EOF >README.txt
+alivecoding $VERSION
+====================
+
+https://alive.s-ol.nu
+https://github.com/s-ol/alivecoding
+
+License
+-------
+alive is licensed under the GPLv3 free and open-source license, a copy of which
+you can find in the file `alive/LICENSE`.
+
+This binary distribution of alive contains the Lua interpreter, LuaRocks package
+manager, and a number of Lua modules licensed under various terms. Lua and
+LuaRocks are both licensed under the MIT license, while the packages can be
+found within the `lua/lua` directory while their individual licensing
+information may be viewed using `luarocks.bat`:
+
+ cmd.exe> luarocks.bat list
+ cmd.exe> luarocks.bat show moonscript
+ cmd.exe> luarocks.bat show ...
+EOF
+
+cd ..
+rm "$BUNDLE.zip"
+zip -rm "$BUNDLE.zip" "$BUNDLE"
diff --git a/dist/fix-lua-win.sh b/dist/fix-lua-win.sh
new file mode 100755
index 0000000..8bf352f
--- /dev/null
+++ b/dist/fix-lua-win.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+IN=$1
+
+head -n 2 $IN
+
+cat <<EOF
+set PR=%~dp0..\\..\\
+set PP=%PR:\\=/%
+EOF
+
+PP="D:/alive_pkg/lua/"
+PR=${PP//\//\\\\}\\\\?
+
+tail -n 2 $IN | \
+sed -r "s|${PR}|%PR%|g" | \
+sed "s|${PP}|%PP%|g"
diff --git a/dist/release b/dist/release.sh
index e7b6923..e7b6923 100755
--- a/dist/release
+++ b/dist/release.sh