update URLs

This commit is contained in:
Astound 2024-08-01 23:55:55 +08:00
parent c19d3a9414
commit 38ea97b31b
Signed by: kaiser
GPG Key ID: 97504AF0027B1A56
6 changed files with 31 additions and 34 deletions

View File

@ -2,7 +2,7 @@
1. Generate sha512sum 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/"` - `cd "$HOME/bash/"`

View File

@ -52,7 +52,7 @@ Custom Prompt Shell Settings for Bash
1. Download file `install.sh`: 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` 2. Run file `install.sh`
@ -78,8 +78,8 @@ Custom Prompt Shell Settings for Bash
2. Clone the HyperTerm repository: 2. Clone the HyperTerm repository:
- Mirror 1: `git clone https://git.sr.ht/~heckyel/hyperterm.git "$HOME/bash"` - Mirror 1: `git clone https://git.fridu.us/heckyel/hyperterm.git "$HOME/bash"`
- Mirror 2: `git clone https://notabug.org/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 3. Copy the HyperTerm files to your Local Directory
@ -178,11 +178,7 @@ Custom Prompt Shell Settings for Bash
1. Download file `uninstall.sh`: 1. Download file `uninstall.sh`:
$ 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"
or
$ curl -Ls https://notabug.org/heckyel/hyperterm/raw/master/uninstall.sh -o "$HOME/uninstall.sh"
2. Run file `uninstall.sh`: 2. Run file `uninstall.sh`:

View File

@ -50,7 +50,7 @@ Configuración personalizada del Prompt Shell para Bash
1. Descargar el archivo `install.sh`: 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` 2. Ejecutar el archivo `install.sh`
@ -76,8 +76,8 @@ Configuración personalizada del Prompt Shell para Bash
2. Clona el repositorio HyperTerm: 2. Clona el repositorio HyperTerm:
- Mirror 1: `git clone https://git.sr.ht/~heckyel/hyperterm.git "$HOME/bash"` - Mirror 1: `git clone https://git.fridu.us/heckyel/hyperterm.git "$HOME/bash"`
- Mirror 2: `git clone https://notabug.org/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 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`: 1. Descargar el archivo `uninstall.sh`:
```console ```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`: 2. Ejecutar el archivo `uninstall.sh`:

View File

@ -14,16 +14,15 @@ function _url_exists() {
} }
function _urls() { function _urls() {
URL_1="https://c.fridu.us/software/hyperterm.git" URL_1="https://git.fridu.us/heckyel/hyperterm"
URL_2="https://git.sr.ht/~heckyel/hyperterm" URL_2="https://c.fridu.us/software/hyperterm.git"
case $(_url_exists "$URL_1") in if [ "$(_url_exists "$URL_1")" -eq 200 ]; then
200) URL="$URL_1" URL="$URL_1"
RAW="$URL_1/plain";; RAW="$URL_1/raw/branch/master"
esac elif [ "$(_url_exists "$URL_2")" -eq 200 ]; then
case $(_url_exists "$URL_2") in URL="$URL_2"
200) URL="$URL_2" RAW="$URL_2/plain"
RAW="$URL_2/blob/master";; fi
esac
} }
# ---------------------- # ----------------------
@ -81,6 +80,8 @@ function updbashrc() {
case $(_url_exists "$URL") in case $(_url_exists "$URL") in
200) 200)
# clone '--depth=1' not support cgit # clone '--depth=1' not support cgit
msg "Usando: $URL" \
"Using: $URL"
(git clone $URL /tmp/hyperterm/ --depth=1 &> /dev/null) (git clone $URL /tmp/hyperterm/ --depth=1 &> /dev/null)
printf '%s\r' "##### (33%)" printf '%s\r' "##### (33%)"
sleep 1 sleep 1

View File

@ -1,6 +1,6 @@
cdfe049ec07f02a1893cda29c13085d06709e09a30b0c2e1111585278315f03139d61080c883cb3fd87f2bf64e05d9b5e5eaaad84c97ced890d83c73eb399fcb ../.bash_profile cdfe049ec07f02a1893cda29c13085d06709e09a30b0c2e1111585278315f03139d61080c883cb3fd87f2bf64e05d9b5e5eaaad84c97ced890d83c73eb399fcb ../.bash_profile
04ab2fefad0680b22001f241e2ce772d07eadef206bd09208627d9dc1b4366d190374d439930215db5f5a742f9fe0bba8fcbaf34164a9332ad7e132c70ba9f92 ./hyperterm.sh 04ab2fefad0680b22001f241e2ce772d07eadef206bd09208627d9dc1b4366d190374d439930215db5f5a742f9fe0bba8fcbaf34164a9332ad7e132c70ba9f92 ./hyperterm.sh
e30b95c0ca1d067106e6b33de5252556191c5c882a3fe3c989598d3a01ed120397b465980905afb976407a3ef2ba0625ad00beb9482ac40cdbac5e6e887c8f0d ./core/update.sh abbceb6ae6d2c13f02152334894a09e2f0d9d84a1bfd57a43ade158d25e5ab53da9396c8995a28f9422263299fafe349da09e19311de46b45494454ab517a9ca ./core/update.sh
1cfba599047d84a17ff92b695ebf527a505a30acc9ec21a2b9f410a7ea6dde4b23b5cf62e557d82f2fe9a8980649942424b879ca53baae4d4cb3057681baa7b6 ./core/colors.sh 1cfba599047d84a17ff92b695ebf527a505a30acc9ec21a2b9f410a7ea6dde4b23b5cf62e557d82f2fe9a8980649942424b879ca53baae4d4cb3057681baa7b6 ./core/colors.sh
2036a79215a5434e31f3406bea3f2ffa7e94ffef86c2d1ceb8865db29f19fe7f342f9cab93288f57c75daed36ef146f85d15f8d633931a27d55c3983f55ef15b ./core/git.sh 2036a79215a5434e31f3406bea3f2ffa7e94ffef86c2d1ceb8865db29f19fe7f342f9cab93288f57c75daed36ef146f85d15f8d633931a27d55c3983f55ef15b ./core/git.sh
f3e00b2aa8ab9f3ab44570adaa2520408ed66fd00f551654d60b64a4be3546ec781b7efa39bcd774937e654b6ffb4c7af3f21eeb36caf9c01f82f85cf28e2b4d ./core/languages.sh f3e00b2aa8ab9f3ab44570adaa2520408ed66fd00f551654d60b64a4be3546ec781b7efa39bcd774937e654b6ffb4c7af3f21eeb36caf9c01f82f85cf28e2b4d ./core/languages.sh

View File

@ -61,8 +61,8 @@ function _url_exists() {
} }
function _urls() { function _urls() {
URL_1="https://git.sr.ht/~heckyel/hyperterm" URL_1="https://git.fridu.us/heckyel/hyperterm"
URL_2="https://notabug.org/heckyel/hyperterm" URL_2="https://c.fridu.us/heckyel/hyperterm"
if [[ $(_url_exists "$URL_1") -eq 0 ]]; then if [[ $(_url_exists "$URL_1") -eq 0 ]]; then
URL="$URL_1" URL="$URL_1"
@ -103,7 +103,7 @@ function clone_new() {
# copy # copy
msg "\e[1;32m==>\e[0m\033[1m Copiando hyperterm... \e[m" \ msg "\e[1;32m==>\e[0m\033[1m Copiando hyperterm... \e[m" \
"\e[1;32m==>\e[0m\033[1m Copying 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/" install -d -m755 "$HOME/.hyperterm/"
cp -r /tmp/hyperterm/hyperterm/* "$HOME/.hyperterm/" cp -r /tmp/hyperterm/hyperterm/* "$HOME/.hyperterm/"
install -m644 /tmp/hyperterm/.bash_profile "$HOME/" install -m644 /tmp/hyperterm/.bash_profile "$HOME/"
@ -122,7 +122,7 @@ function clean_temp() {
# clean up temp files # clean up temp files
msg "\e[1;32m==>\e[0m\033[1m Limpiando archivos temporales... \e[m" \ 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" "\e[1;32m==>\e[0m\033[1m Clean up temp files... \e[m"
if [[ $silent ]]; then if [[ "$silent" ]]; then
rm -rf /tmp/hyperterm/ rm -rf /tmp/hyperterm/
if [[ -f "$HOME/.hyperterm/template/bash_profile.template.bash" ]]; then if [[ -f "$HOME/.hyperterm/template/bash_profile.template.bash" ]]; then
rm -fr "$HOME/.hyperterm/template/" rm -fr "$HOME/.hyperterm/template/"
@ -164,10 +164,10 @@ OPTIND=1
while getopts "hsn" opt while getopts "hsn" opt
do do
case "$opt" in case "$opt" in
"h") show_usage; exit 0 ;; "h") show_usage;;
"s") silent=true ;; "s") silent=true ;;
"n") no_modify_config=true ;; "n") no_modify_config=true ;;
"?") show_usage >&2; exit 1 ;; "?") show_usage >&2;;
esac esac
done done
shift $((OPTIND - 1)) shift $((OPTIND - 1))
@ -186,11 +186,11 @@ esac
BACKUP_FILE=$CONFIG_FILE.bak BACKUP_FILE=$CONFIG_FILE.bak
msg "Instalando HyperTerm" \ msg "Instalando HyperTerm" \
"Installing HyperTerm" "Installing HyperTerm"
if ! [[ $silent ]] && ! [[ $no_modify_config ]]; then if ! [[ "$silent" ]] && ! [[ "$no_modify_config" ]]; then
if [ -e "$HOME/$BACKUP_FILE" ]; 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" \ 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" "\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] " \ 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] ") "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 done
fi 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] " \ 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] ") "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 read -e -n 1 -r -p "$question" choice
@ -240,7 +240,7 @@ if ! [[ $silent ]] && ! [[ $no_modify_config ]]; then
;; ;;
esac esac
done done
elif [[ $silent ]] && ! [[ $no_modify_config ]]; then elif [[ "$silent" ]] && ! [[ "$no_modify_config" ]]; then
# backup/new by default # backup/new by default
backup_new "$@" backup_new "$@"
fi fi