From 9d8423f3243073e767db8ad519f6ec46a4ef8cac Mon Sep 17 00:00:00 2001 From: Test Date: Thu, 16 Feb 2023 06:28:58 +0000 Subject: [PATCH] init --- build.sh | 26 ++++++++++++++++++++++++++ clone.sh | 17 +++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100755 build.sh create mode 100755 clone.sh diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..cb8ab09 --- /dev/null +++ b/build.sh @@ -0,0 +1,26 @@ +# Build Script + +# rhel openjdk install tools +# microdnf install findutils git + +export ANDROID_HOME="/opt/android/sdk" +export PATH=$PATH:/opt/android/sdk/cmdline-tools/tools/bin +if [ ! -d "$ANDROID_HOME/cmdline-tools" ]; then + curl -o sdk.zip https://dl.google.com/android/repository/commandlinetools-linux-7583922_latest.zip + unzip sdk.zip + rm sdk.zip + mkdir "$ANDROID_HOME/cmdline-tools" + mv cmdline-tools "$ANDROID_HOME/cmdline-tools/tools" + yes | "$ANDROID_HOME/cmdline-tools/tools/bin/sdkmanager" --licenses +fi + +# Clone NewPipeExtractor +# rm -fr NewPipeExtractor +# chmod 755 ./clone.sh && ./clone.sh + +# Change dir +cd "NewPipe" + +chmod +x gradlew +./gradlew assembleDebug +#./gradlew assembleRelease \ No newline at end of file diff --git a/clone.sh b/clone.sh new file mode 100755 index 0000000..470f104 --- /dev/null +++ b/clone.sh @@ -0,0 +1,17 @@ +# Get release 0.25.0 +TAG_1="0.25.0" +wget "https://github.com/TeamNewPipe/NewPipe/archive/refs/tags/v$TAG.zip" -O "np.zip" +# Get Commit "7e793c1" +TAG_2="7e793c11aec46358ccbfd8bcfcf521105f4f093a" +wget "https://github.com/TeamNewPipe/NewPipeExtractor/archive/$TAG.zip" -O "npe.zip" + +# unzip +unzip "np.zip" +unzip "npe.zip" + +# remove zip +rm "np.zip" "npe.zip" + +# move +mv "NewPipe-$TAG_1" "NewPipe" +mv "NewPipeExtractor-$TAG_2" "NewPipeExtractor" \ No newline at end of file