From 38ea97b31b3d6ee21a9e9c0f65d63c2868341edc Mon Sep 17 00:00:00 2001 From: Astound Date: Thu, 1 Aug 2024 23:55:55 +0800 Subject: update URLs --- install.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'install.sh') diff --git a/install.sh b/install.sh index 8658b63..409f594 100644 --- a/install.sh +++ b/install.sh @@ -61,8 +61,8 @@ function _url_exists() { } function _urls() { - URL_1="https://git.sr.ht/~heckyel/hyperterm" - URL_2="https://notabug.org/heckyel/hyperterm" + URL_1="https://git.fridu.us/heckyel/hyperterm" + URL_2="https://c.fridu.us/heckyel/hyperterm" if [[ $(_url_exists "$URL_1") -eq 0 ]]; then URL="$URL_1" @@ -103,7 +103,7 @@ function clone_new() { # copy msg "\e[1;32m==>\e[0m\033[1m Copiando hyperterm... \e[m" \ "\e[1;32m==>\e[0m\033[1m Copying hyperterm... \e[m" - if [[ $silent ]]; then + if [[ "$silent" ]]; then install -d -m755 "$HOME/.hyperterm/" cp -r /tmp/hyperterm/hyperterm/* "$HOME/.hyperterm/" install -m644 /tmp/hyperterm/.bash_profile "$HOME/" @@ -122,7 +122,7 @@ function clean_temp() { # clean up temp files msg "\e[1;32m==>\e[0m\033[1m Limpiando archivos temporales... \e[m" \ "\e[1;32m==>\e[0m\033[1m Clean up temp files... \e[m" - if [[ $silent ]]; then + if [[ "$silent" ]]; then rm -rf /tmp/hyperterm/ if [[ -f "$HOME/.hyperterm/template/bash_profile.template.bash" ]]; then rm -fr "$HOME/.hyperterm/template/" @@ -164,10 +164,10 @@ OPTIND=1 while getopts "hsn" opt do case "$opt" in - "h") show_usage; exit 0 ;; + "h") show_usage;; "s") silent=true ;; "n") no_modify_config=true ;; - "?") show_usage >&2; exit 1 ;; + "?") show_usage >&2;; esac done shift $((OPTIND - 1)) @@ -186,11 +186,11 @@ esac BACKUP_FILE=$CONFIG_FILE.bak msg "Instalando HyperTerm" \ "Installing HyperTerm" -if ! [[ $silent ]] && ! [[ $no_modify_config ]]; then +if ! [[ "$silent" ]] && ! [[ "$no_modify_config" ]]; then if [ -e "$HOME/$BACKUP_FILE" ]; then msg_err "\033[0;36mEl archivo de respaldo ya existe. Asegúrese de hacer una copia de seguridad de su .bashrc antes de ejecutar esta instalación. \033[0m" \ "\033[0;36mBackup file already exists. Make sure to backup your .bashrc before running this installation. \033[0m" - while ! [ $silent ]; do + while ! [ "$silent" ]; do question=$(msg "¿Desea sobrescribir la copia de seguridad existente? Esto eliminará su archivo de copia de seguridad existente ($HOME/$BACKUP_FILE) [s/N] " \ "Would you like to overwrite the existing backup? This will delete your existing backup file ($HOME/$BACKUP_FILE) [y/N] ") @@ -212,7 +212,7 @@ if ! [[ $silent ]] && ! [[ $no_modify_config ]]; then done fi - while ! [ $silent ]; do + while ! [ "$silent" ]; do question=$(msg "¿Le gustaría conservar su configuración de $CONFIG_FILE y agregar plantillas de HyperTerm al final? [s/N] " \ "Would you like to keep your config $CONFIG_FILE and append HyperTerm templates at the end? [y/N] ") read -e -n 1 -r -p "$question" choice @@ -240,7 +240,7 @@ if ! [[ $silent ]] && ! [[ $no_modify_config ]]; then ;; esac done -elif [[ $silent ]] && ! [[ $no_modify_config ]]; then +elif [[ "$silent" ]] && ! [[ "$no_modify_config" ]]; then # backup/new by default backup_new "$@" fi -- cgit v1.2.3