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:
parent
451173a451
commit
00ac0ad44d
8
gogh.sh
8
gogh.sh
@ -183,6 +183,7 @@ declare -a THEMES=(
|
||||
|
||||
# Allow developer to change url to forked url for easier testing
|
||||
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() {
|
||||
local ARGUMENT=$1
|
||||
@ -329,10 +330,11 @@ fi
|
||||
# | ::::::: Fancy progressbar for lengthy operations
|
||||
# |
|
||||
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
|
||||
eval "$(curl -sLo- https://git.io/progressbar)" 2> /dev/null
|
||||
eval "$(curl -so- ${PROGRESS_URL})" 2> /dev/null
|
||||
else
|
||||
eval "$(wget -qO- https://git.io/progressbar)" 2> /dev/null
|
||||
eval "$(wget -qO- ${PROGRESS_URL})" 2> /dev/null
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -410,4 +412,6 @@ for OP in "${OPTION[@]#0}"; do
|
||||
exit 1
|
||||
fi
|
||||
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 || :
|
||||
|
@ -203,7 +203,9 @@ declare -a THEMES=(
|
||||
)
|
||||
|
||||
# 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"}
|
||||
PROGRESS_URL="https://raw.githubusercontent.com/phenonymous/shell-progressbar/1.0/progress.sh"
|
||||
|
||||
capitalize() {
|
||||
local ARGUMENT=$1
|
||||
@ -243,10 +245,11 @@ remove_file_extension (){
|
||||
}
|
||||
|
||||
# Fancy progress bar
|
||||
# Note: We use eval here because we want the functions to be available in this script
|
||||
if [[ "$(uname)" = "Darwin" ]]; then
|
||||
eval "$(curl -sLo- https://git.io/progressbar)" 2> /dev/null
|
||||
eval "$(curl -so- ${PROGRESS_URL})" 2> /dev/null
|
||||
else
|
||||
eval "$(wget -qO- https://git.io/progressbar)" 2> /dev/null
|
||||
eval "$(wget -qO- ${PROGRESS_URL})" 2> /dev/null
|
||||
fi
|
||||
|
||||
declare color_dot_str
|
||||
|
Loading…
Reference in New Issue
Block a user