1
0
mirror of https://github.com/Mayccoll/Gogh.git synced 2023-08-10 21:12:46 +03:00

Change progressbar url to raw release

This commit is contained in:
phenonymous 2018-12-01 18:06:39 +01:00
parent 451173a451
commit 00ac0ad44d
2 changed files with 11 additions and 4 deletions

View File

@ -183,6 +183,7 @@ declare -a THEMES=(
# Allow developer to change url to forked url for easier testing # Allow developer to change url to forked url for easier testing
BASE_URL=${BASE_URL:-"https://raw.githubusercontent.com/Mayccoll/Gogh/master"} BASE_URL=${BASE_URL:-"https://raw.githubusercontent.com/Mayccoll/Gogh/master"}
PROGRESS_URL="https://raw.githubusercontent.com/phenonymous/shell-progressbar/1.0/progress.sh"
capitalize() { capitalize() {
local ARGUMENT=$1 local ARGUMENT=$1
@ -329,10 +330,11 @@ fi
# | ::::::: Fancy progressbar for lengthy operations # | ::::::: Fancy progressbar for lengthy operations
# | # |
if [[ ${#OPTION[@]} -gt 5 ]]; then if [[ ${#OPTION[@]} -gt 5 ]]; then
# Note: We use eval here because we want the functions to be available in this script
if [[ "$(uname)" = "Darwin" ]]; then if [[ "$(uname)" = "Darwin" ]]; then
eval "$(curl -sLo- https://git.io/progressbar)" 2> /dev/null eval "$(curl -so- ${PROGRESS_URL})" 2> /dev/null
else else
eval "$(wget -qO- https://git.io/progressbar)" 2> /dev/null eval "$(wget -qO- ${PROGRESS_URL})" 2> /dev/null
fi fi
fi fi
@ -410,4 +412,6 @@ for OP in "${OPTION[@]#0}"; do
exit 1 exit 1
fi fi
done done
# If you skip || : and the command does not exist the script will exit with code 1
# this will always return exit code 0 if we got this far
command -v bar::stop > /dev/null && bar::stop || : command -v bar::stop > /dev/null && bar::stop || :

View File

@ -203,7 +203,9 @@ declare -a THEMES=(
) )
# Allow developer to change url to forked url for easier testing # Allow developer to change url to forked url for easier testing
# IMPORTANT: Make sure you export this variable if your main shell is not bash
BASE_URL=${BASE_URL:-"https://raw.githubusercontent.com/Mayccoll/Gogh/master"} BASE_URL=${BASE_URL:-"https://raw.githubusercontent.com/Mayccoll/Gogh/master"}
PROGRESS_URL="https://raw.githubusercontent.com/phenonymous/shell-progressbar/1.0/progress.sh"
capitalize() { capitalize() {
local ARGUMENT=$1 local ARGUMENT=$1
@ -243,10 +245,11 @@ remove_file_extension (){
} }
# Fancy progress bar # Fancy progress bar
# Note: We use eval here because we want the functions to be available in this script
if [[ "$(uname)" = "Darwin" ]]; then if [[ "$(uname)" = "Darwin" ]]; then
eval "$(curl -sLo- https://git.io/progressbar)" 2> /dev/null eval "$(curl -so- ${PROGRESS_URL})" 2> /dev/null
else else
eval "$(wget -qO- https://git.io/progressbar)" 2> /dev/null eval "$(wget -qO- ${PROGRESS_URL})" 2> /dev/null
fi fi
declare color_dot_str declare color_dot_str