diff options
-rw-r--r-- | HACKING.md | 2 | ||||
-rw-r--r-- | README.md | 12 | ||||
-rw-r--r-- | README_es.md | 8 | ||||
-rw-r--r-- | hyperterm/core/update.sh | 21 | ||||
-rw-r--r-- | hyperterm/hyperterm.sha512 | 2 | ||||
-rw-r--r-- | install.sh | 20 |
6 files changed, 31 insertions, 34 deletions
@@ -2,7 +2,7 @@ 1. Generate sha512sum - - `git clone https://notabug.org/heckyel/hyperterm "$HOME/bash"` + - `git clone https://git.fridu.us/heckyel/hyperterm "$HOME/bash"` - `cd "$HOME/bash/"` @@ -52,7 +52,7 @@ Custom Prompt Shell Settings for Bash 1. Download file `install.sh`: - $ curl -Ls https://c.fridu.us/software/hyperterm.git/plain/install.sh -o "$HOME/install.sh" + $ curl -Ls https://git.fridu.us/heckyel/hyperterm/raw/branch/master/install.sh -o "$HOME/install.sh" 2. Run file `install.sh` @@ -78,8 +78,8 @@ Custom Prompt Shell Settings for Bash 2. Clone the HyperTerm repository: - - Mirror 1: `git clone https://git.sr.ht/~heckyel/hyperterm.git "$HOME/bash"` - - Mirror 2: `git clone https://notabug.org/heckyel/hyperterm.git "$HOME/bash"` + - Mirror 1: `git clone https://git.fridu.us/heckyel/hyperterm.git "$HOME/bash"` + - Mirror 2: `git clone https://c.fridu.us/heckyel/hyperterm.git "$HOME/bash"` 3. Copy the HyperTerm files to your Local Directory @@ -178,11 +178,7 @@ Custom Prompt Shell Settings for Bash 1. Download file `uninstall.sh`: - $ curl -Ls https://git.sr.ht/~heckyel/hyperterm/blob/master/uninstall.sh -o "$HOME/uninstall.sh" - - or - - $ curl -Ls https://notabug.org/heckyel/hyperterm/raw/master/uninstall.sh -o "$HOME/uninstall.sh" + $ curl -Ls https://git.fridu.us/heckyel/hyperterm/raw/branch/master/uninstall.sh -o "$HOME/uninstall.sh" 2. Run file `uninstall.sh`: diff --git a/README_es.md b/README_es.md index d4ee3d7..46d3182 100644 --- a/README_es.md +++ b/README_es.md @@ -50,7 +50,7 @@ Configuración personalizada del Prompt Shell para Bash 1. Descargar el archivo `install.sh`: - curl -Ls https://git.sr.ht/~heckyel/hyperterm/blob/master/install.sh -o "$HOME/install.sh" + curl -Ls https://git.fridu.us/heckyel/hyperterm/raw/branch/master/install.sh -o "$HOME/install.sh" 2. Ejecutar el archivo `install.sh` @@ -76,8 +76,8 @@ Configuración personalizada del Prompt Shell para Bash 2. Clona el repositorio HyperTerm: - - Mirror 1: `git clone https://git.sr.ht/~heckyel/hyperterm.git "$HOME/bash"` - - Mirror 2: `git clone https://notabug.org/heckyel/hyperterm.git "$HOME/bash"` + - Mirror 1: `git clone https://git.fridu.us/heckyel/hyperterm.git "$HOME/bash"` + - Mirror 2: `git clone https://c.fridu.us/heckyel/hyperterm.git "$HOME/bash"` 3. Copia los archivos de HyperTerm en tu Directorio Local @@ -177,7 +177,7 @@ Configuración personalizada del Prompt Shell para Bash 1. Descargar el archivo `uninstall.sh`: ```console - $ curl -Ls https://git.sr.ht/~heckyel/hyperterm/blob/master/uninstall.sh -o "$HOME/uninstall.sh" + $ curl -Ls https://git.fridu.us/heckyel/hyperterm/raw/branch/master/uninstall.sh -o "$HOME/uninstall.sh" ``` 2. Ejecutar el archivo `uninstall.sh`: diff --git a/hyperterm/core/update.sh b/hyperterm/core/update.sh index 486a09d..a3b4f9c 100644 --- a/hyperterm/core/update.sh +++ b/hyperterm/core/update.sh @@ -14,16 +14,15 @@ function _url_exists() { } function _urls() { - URL_1="https://c.fridu.us/software/hyperterm.git" - URL_2="https://git.sr.ht/~heckyel/hyperterm" - case $(_url_exists "$URL_1") in - 200) URL="$URL_1" - RAW="$URL_1/plain";; - esac - case $(_url_exists "$URL_2") in - 200) URL="$URL_2" - RAW="$URL_2/blob/master";; - esac + URL_1="https://git.fridu.us/heckyel/hyperterm" + URL_2="https://c.fridu.us/software/hyperterm.git" + if [ "$(_url_exists "$URL_1")" -eq 200 ]; then + URL="$URL_1" + RAW="$URL_1/raw/branch/master" + elif [ "$(_url_exists "$URL_2")" -eq 200 ]; then + URL="$URL_2" + RAW="$URL_2/plain" + fi } # ---------------------- @@ -81,6 +80,8 @@ function updbashrc() { case $(_url_exists "$URL") in 200) # clone '--depth=1' not support cgit + msg "Usando: $URL" \ + "Using: $URL" (git clone $URL /tmp/hyperterm/ --depth=1 &> /dev/null) printf '%s\r' "##### (33%)" sleep 1 diff --git a/hyperterm/hyperterm.sha512 b/hyperterm/hyperterm.sha512 index 1066e33..717aa86 100644 --- a/hyperterm/hyperterm.sha512 +++ b/hyperterm/hyperterm.sha512 @@ -1,6 +1,6 @@ cdfe049ec07f02a1893cda29c13085d06709e09a30b0c2e1111585278315f03139d61080c883cb3fd87f2bf64e05d9b5e5eaaad84c97ced890d83c73eb399fcb ../.bash_profile 04ab2fefad0680b22001f241e2ce772d07eadef206bd09208627d9dc1b4366d190374d439930215db5f5a742f9fe0bba8fcbaf34164a9332ad7e132c70ba9f92 ./hyperterm.sh -e30b95c0ca1d067106e6b33de5252556191c5c882a3fe3c989598d3a01ed120397b465980905afb976407a3ef2ba0625ad00beb9482ac40cdbac5e6e887c8f0d ./core/update.sh +abbceb6ae6d2c13f02152334894a09e2f0d9d84a1bfd57a43ade158d25e5ab53da9396c8995a28f9422263299fafe349da09e19311de46b45494454ab517a9ca ./core/update.sh 1cfba599047d84a17ff92b695ebf527a505a30acc9ec21a2b9f410a7ea6dde4b23b5cf62e557d82f2fe9a8980649942424b879ca53baae4d4cb3057681baa7b6 ./core/colors.sh 2036a79215a5434e31f3406bea3f2ffa7e94ffef86c2d1ceb8865db29f19fe7f342f9cab93288f57c75daed36ef146f85d15f8d633931a27d55c3983f55ef15b ./core/git.sh f3e00b2aa8ab9f3ab44570adaa2520408ed66fd00f551654d60b64a4be3546ec781b7efa39bcd774937e654b6ffb4c7af3f21eeb36caf9c01f82f85cf28e2b4d ./core/languages.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 |