Skip to content

Commit

Permalink
New scripts to autoupdater.
Browse files Browse the repository at this point in the history
  • Loading branch information
nagolove committed Mar 18, 2020
1 parent 72c3f22 commit a3fc0a1
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
14 changes: 14 additions & 0 deletions correct-filelist.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env luajit

local fileName = arg[1]
print(fileName)
local fileHndlr = io.open(fileName, "r")
local content = fileHndlr:read("*a")
print(type(content))
local modified = string.gsub(content, "%./", ""):gsub("/", "\\")
fileHndlr:close()
print("---------")
local modFileName = string.gsub(fileName, "%.", "_.")
fileHndlr = io.open(modFileName, "w")
fileHndlr:write(modified)
print(modified)
26 changes: 26 additions & 0 deletions pkg_send.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env bash

case "$(uname)" in
Linux*)
echo "Linux"
#find . -name "*.lua" -or -name "*.wav" -or -name "*.png" ! -name "correct-filelist.lua" | apack monochrome-tetris.zip
#scp monochrome-tetris.zip [email protected]:/home/dekar/www/packages
#ssh [email protected] /home/dekar/bin/update_index.lua
#rm monochrome-tetris.zip
;;
MINGW*)
packagename="nback-xx.zip"
echo "MinGW"
find . -name "*.lua" -or -name "*.wav" -or -name "*.ttf" -or -name "*.png" ! -name "correct-filelist.lua" > files.txt
./correct-filelist.lua files.txt
#cat files.txt
/c/Program\ Files/7-Zip/7z.exe a $packagename @files_.txt
rm files.txt
rm files_.txt
scp $packagename [email protected]:/home/dekar/www/packages
ssh [email protected] /home/dekar/bin/update_index.lua
rm $packagename
;;
*)
echo "Unknown system"
esac

0 comments on commit a3fc0a1

Please sign in to comment.