Skip to content

Commit

Permalink
build/script: Use Wetransfer for uploading builds
Browse files Browse the repository at this point in the history
Signed-off-by: Arjun-Ingole <[email protected]>
  • Loading branch information
Arjun-Ingole committed Jan 26, 2022
1 parent 0396c85 commit 064c2e4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,8 @@ kernel/configs/android-*.cfg
#Ignoring Android.bp link file
#
Android.bp

# Build
out/
*.zip
transfer
17 changes: 16 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,20 @@ SECONDS=0 # builtin bash timer
ZIPNAME="HydrogenKernel-miatoll-$(date '+%Y%m%d-%H%M').zip"
GCC64_DIR="$HOME/GCC/aarch64-elf"
GCC32_DIR="$HOME/GCC/arm-eabi"
WET="transfer"
DEFCONFIG="cust_defconfig"

export PATH="$GCC64_DIR/bin:$PATH"
export PATH="$GCC32_DIR/bin/:$PATH"

if ! [ -a "$WET" ]; then
echo "Setting up wetransfer"
if ! curl -sL https://git.io/file-transfer | sh; then
echo "Unable to setup wetransfer ..... aborting"
exit 1
fi
fi

if ! [ -d "$GCC64_DIR" ]; then
echo "GCC for arm64 not found! Cloning to $GCC64_DIR..."
if ! git clone --depth=1 https://github.com/Positron-Foundation/android_prebuilts_gcc_linux-x86_aarch64_aarch64-none-elf $GCC64_DIR; then
Expand All @@ -32,6 +41,12 @@ if [[ $1 = "-c" || $1 = "--clean" ]]; then
rm -rf out
fi

if [[ $1 = "-r" || $1 = "--regen" ]]; then
make O=out ARCH=arm64 $DEFCONFIG savedefconfig
cp out/defconfig arch/arm64/configs/$DEFCONFIG
exit 1;
fi

mkdir -p out
make O=out ARCH=arm64 $DEFCONFIG

Expand All @@ -54,7 +69,7 @@ cd ..
rm -rf AnyKernel3
echo -e "\nCompleted in $((SECONDS / 60)) minute(s) and $((SECONDS % 60)) second(s) !"
echo "Zip: $ZIPNAME"
curl --upload-file $ZIPNAME http://transfer.sh/$ZIPNAME; echo
./transfer wet $ZIPNAME; echo
else
echo -e "\nCompilation failed!"
fi

0 comments on commit 064c2e4

Please sign in to comment.