Remove hardcode'd docker paths

This commit is contained in:
ave 2021-08-22 20:04:01 +03:00
parent b6f80bbee0
commit d139344274
2 changed files with 20 additions and 5 deletions

View file

@ -1,10 +1,26 @@
#!/bin/bash
cd /opt/ctc/gitrepo/resources/patches/slashcommands/code
if [ -z "$DISTOK_FOLDER" ]
then
cd /opt/ctc/gitrepo/resources/patches/slashcommands/code
else
cd "$DISTOK_FOLDER/resources/patches/slashcommands/code"
fi
if [ -z "$DISTOK_APKTOOL_COMMAND" ]
then
DISTOK_APKTOOL_COMMAND="java -jar /opt/ctc/tools/apktool.jar"
fi
if [ -z "$DISTOK_DX_COMMAND" ]
then
DISTOK_DX_COMMAND="/lib/android-sdk/build-tools/debian/dx"
fi
chmod +x gradlew
rm -rf build
./gradlew build
cd build/libs
/lib/android-sdk/build-tools/debian/dx --dex --output ctccommands.apk ctccommands-1.0-SNAPSHOT.jar
java -jar /opt/ctc/tools/apktool.jar d ctccommands.apk
$DISTOK_DX_COMMAND --dex --output ctccommands.apk ctccommands-1.0-SNAPSHOT.jar
$DISTOK_APKTOOL_COMMAND d ctccommands.apk
cp -r ctccommands/smali/* ${DISTOK_EXTRACTED_DISCORD_PATH}/smali/