diff options
-rw-r--r-- | README.md | 7 | ||||
-rwxr-xr-x | androdeb | 14 |
2 files changed, 19 insertions, 2 deletions
@@ -51,6 +51,13 @@ cd adeb # Add some short cuts: sudo ln -s $(pwd)/adeb /usr/bin/adeb + +# For cached image downloads which result in a huge speed-up, +# You could set the ADEB_REPO_URL environment variable in your +# bashrc file. +# Disclaimer: Google is not liable for the below URL and this +# is just an example. +export ADEB_REPO_URL="github.com/joelagnel/" ``` * Installing adeb onto your device: @@ -225,8 +225,18 @@ if [ $DOWNLOAD -eq 1 ]; then c_info "Downloading Androdeb from the web..."; c_info "" # Github dropped tar gz support! ##?#??#! Now we've to zip everything. - curl -L https://github.com/joelagnel/adeb/releases/download/$VERSION/$FNAME --output $TDIR_ABS/$FNAME - unzip -e $TDIR_ABS/$FNAME -d $TDIR_ABS/ + if [ -z $ADEB_REPO_URL ]; then + c_warning "Automatic download is disabled. To enable it, please set the \$ADEB_REPO_URL" + c_warning "environment variable as recommended in the setup instructions in the README.md" + do_cleanup + exit 0 + fi + + curl -L https://$ADEB_REPO_URL/adeb/releases/download/$VERSION/$FNAME --output $TDIR_ABS/$FNAME || + die 9 "Failed to download adeb release." + + unzip -e $TDIR_ABS/$FNAME -d $TDIR_ABS/ || + die 10 "Failed to download adeb release. Double check the ADEB_REPO_URL value." TARF=$TDIR_ABS/$FNAME_UZ fi |