diff options
| author | s-ol <s-ol@users.noreply.github.com> | 2020-05-15 11:25:15 +0000 |
|---|---|---|
| committer | s-ol <s+removethis@s-ol.nu> | 2025-03-02 14:24:49 +0000 |
| commit | e6ec38029d08708bc947cf00f1c86529d2d20808 (patch) | |
| tree | 6857566053c70de7076bb29f0e609cb0268f9768 /dist/fix-bat-script.sh | |
| parent | move copilot logic, make startup scripts lua (diff) | |
| download | alive-e6ec38029d08708bc947cf00f1c86529d2d20808.tar.gz alive-e6ec38029d08708bc947cf00f1c86529d2d20808.zip | |
update windows release logic
Diffstat (limited to 'dist/fix-bat-script.sh')
| -rwxr-xr-x | dist/fix-bat-script.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/dist/fix-bat-script.sh b/dist/fix-bat-script.sh new file mode 100755 index 0000000..0a3c8f0 --- /dev/null +++ b/dist/fix-bat-script.sh @@ -0,0 +1,24 @@ +#!/bin/bash +IN=$1 +MODE=$2 + +head -n 2 $IN + +cat <<EOF +set PR=%~dp0..\\ +set PP=%PR:\\=/% +EOF + +PP="D:/alive_pkg/lua/" +PR=${PP//\//\\\\}\\\\? + +if [ "$MODE" = wlua ]; then + tail -n 2 $IN | \ + sed -r "s|${PR}|%PR%|g" | \ + sed "s|${PP}|%PP%|g" | \ + sed 's|"%PR%bin\\lua5.3.exe"|start "Lua" "%PR%bin\\wlua5.3.exe"|' +else + tail -n 2 $IN | \ + sed -r "s|${PR}|%PR%|g" | \ + sed "s|${PP}|%PP%|g" +fi |
