This repository has been archived on 2021-08-24. You can view files and clone it, but cannot push or open issues or pull requests.
cutthecord/resources/patches/slashcommands/87202-pre.sh

26 lines
636 B
Bash
Raw Normal View History

#!/bin/bash
2021-08-22 17:04:01 +00:00
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
2021-08-22 17:04:01 +00:00
$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/