123456789101112131415161718192021222324252627282930313233343536373839404142 |
- #!/bin/sh
- mkdir -p output 2>&1 1>/dev/null
- rm -f out.py 2>&1 1>/dev/null
- rm -f "output/plugin.py" 2>&1 1>/dev/null
- rm -f "output/startup.py" 2>&1 1>/dev/null
- echo "do copy..."
- cd src
- cat uuid.py playerwatcher2.py viewids.py consts.py compressedcookielib.py utils.py portal.py api.py plugin.py >> "../out.py"
- cd ../
- echo "do replace..."
- #./replace 2>&1 > /dev/null
- python "replace.py" "out.py"
- echo "do minify..."
- cp -f "out.py" "output/plugin.py"
- cp -f "src/startup.py" "output/startup.py"
- cat utf8.txt "out.py" > "output/plugin.py"
- #/usr/local/bin/pyminifier --obfuscate-variables --obfuscate-classes --obfuscate-functions --prepend=utf8.txt -o "output/plugin_pure.py" "out.py" 2>&1 >/dev/null
- #/usr/local/bin/pyminifier --obfuscate-variables --obfuscate-classes --obfuscate-functions --prepend=utf8.txt -o "output/plugin.py" "out.py" 2>&1 >/dev/null
- #/usr/local/bin/pyminifier --obfuscate-variables --obfuscate-classes --obfuscate-functions --gzip_modified --prepend=utf8.txt -o "output/plugin.py" "out.py" 2>&1 >/dev/null
- cat utf8.txt "src/startup.py" > "output/startup.py"
- #/usr/local/bin/pyminifier --obfuscate-variables --obfuscate-classes --obfuscate-import-methods --gzip_modified --prepend=utf8.txt -o "output/startup.py" "src/startup.py" 2>&1 >/dev/null
- echo "do cleanup..."
- rm -f out.py
- rm -rf "../Repo/Source/resources"
- rm -rf "../Repo/Source/framework"
- rm -rf "../Repo/Source/mechanize"
- cp -fr "resources" "../Repo/Source/resources"
- cp -fr "framework" "../Repo/Source/framework"
- cp -fr "mechanize" "../Repo/Source/mechanize"
- cp -f "output/startup.py" "../Repo/Source/startup.py"
- cp -f "output/plugin.py" "../Repo/Source/plugin.py"
- cp -f "addon.xml" "../Repo/Source/addon.xml"
- cp -f "fanart.jpg" "../Repo/Source/fanart.jpg" 2>&1 1>/dev/null
- cp -f "icon.png" "../Repo/Source/icon.png" 2>&1 1>/dev/null 2>&1 1>/dev/null
- cp -f "changelog.txt" "../Repo/Source/changelog.txt" 2>&1 1>/dev/null
- cp -fR "resources" "/Users/benjamin/Library/Application Support/Kodi/addons/plugin.video.cryflix/"
- cp -f "addon.xml" "/Users/benjamin/Library/Application Support/Kodi/addons/plugin.video.cryflix/addon.xml"
- cp -f "output/plugin.py" "/Users/benjamin/Library/Application Support/Kodi/addons/plugin.video.cryflix/plugin.py"
- cp -f "output/startup.py" "/Users/benjamin/Library/Application Support/Kodi/addons/plugin.video.cryflix/startup.py"
|