diff options
author | Jesus <heckyel@hyperbola.info> | 2025-05-18 20:57:12 -0500 |
---|---|---|
committer | Jesus <heckyel@hyperbola.info> | 2025-05-18 20:57:12 -0500 |
commit | 4eddfc7561d07bbce12e21b9c3e6b3d9f06c8680 (patch) | |
tree | 92a5e5171cbef9267578ed240e58f8b4cd1418fa | |
parent | c98c789f32ac45ca231350b8bacca07692afe749 (diff) | |
download | hyperterm-4eddfc7561d07bbce12e21b9c3e6b3d9f06c8680.tar.lz hyperterm-4eddfc7561d07bbce12e21b9c3e6b3d9f06c8680.tar.xz hyperterm-4eddfc7561d07bbce12e21b9c3e6b3d9f06c8680.zip |
update hyperterm/core/update.sh
-rw-r--r-- | hyperterm/core/update.sh | 32 | ||||
-rw-r--r-- | hyperterm/hyperterm.sha512 | 2 |
2 files changed, 9 insertions, 25 deletions
diff --git a/hyperterm/core/update.sh b/hyperterm/core/update.sh index dcd71d0..a914901 100644 --- a/hyperterm/core/update.sh +++ b/hyperterm/core/update.sh @@ -78,10 +78,9 @@ function updbashrc() { # Step 2: Verify checksum (cd "$HOME/.hyperterm/" && sha512sum -c hyperterm.sha512 &> /dev/null) - local _interger=$? + local _integer=$? - if [[ "$_interger" -eq 0 ]]; then - # Load colors and print banner + if [[ "$_integer" -eq 0 ]]; then _colors_bash "$@" printf '%b' "${BOLD}${CYAN}" printf '%s\n' ' __ __ ______ ' @@ -105,30 +104,15 @@ function updbashrc() { show_progress 1 sleep 1 - # Step 3: Core files - for f in autocomplete.sh autodep.sh colors.sh git.sh languages.sh status.sh update.sh; do - download_file "hyperterm/core/$f" "$HOME/.hyperterm/core/$f" - done - - # Step 4: Themes - for f in default.sh joy.sh light_theme.sh minterm.sh pure.sh simple.sh special.sh; do - download_file "hyperterm/themes/$f" "$HOME/.hyperterm/themes/$f" - done - + # Step 3: Download all files from hyperterm.sha512 like list + while IFS= read -r line; do + file=$(echo "$line" | cut -d' ' -f2) + file=${file#./} + download_file "hyperterm/$file" "$HOME/.hyperterm/$file" + done < "$HOME/.hyperterm/hyperterm.sha512" show_progress 2 sleep 1 - # Step 5: Tools - for f in aliases.sh compress.sh export.sh listuser.sh network.sh proxy.sh rar2zip.sh ruby.sh ssh-agent.sh sysinfo.sh vconverter.sh virtualenv.sh; do - download_file "hyperterm/tools/$f" "$HOME/.hyperterm/tools/$f" - done - - # Step 6: Main files - download_file "hyperterm/hyperterm.sh" "$HOME/.hyperterm/hyperterm.sh" - download_file "hyperterm/hyperterm.sha512" "$HOME/.hyperterm/hyperterm.sha512" - download_file ".bash_profile" "$HOME/.bash_profile" - - ifexists_custom show_progress 3 _colors_bash "$@" source "$HOME/.bashrc" diff --git a/hyperterm/hyperterm.sha512 b/hyperterm/hyperterm.sha512 index a710e09..caf2fd7 100644 --- a/hyperterm/hyperterm.sha512 +++ b/hyperterm/hyperterm.sha512 @@ -1,5 +1,5 @@ cdfe049ec07f02a1893cda29c13085d06709e09a30b0c2e1111585278315f03139d61080c883cb3fd87f2bf64e05d9b5e5eaaad84c97ced890d83c73eb399fcb ../.bash_profile -d8aee7e20496df3fc31a903a85d086acddbe9c618b88cf5bd22a2c052593a058d956d50e9c6c27eeac3be8899f3cfac13050b43bba9fb4c8f0656d509c7decc3 ./core/update.sh +b760a908a3f6222b974abc1f7464bde0f5427f120f1e7ef1c6d97ae61769e552ef3b5cb88e193e955da72a592f07eadb812413dd50a691cd3dbb33e3da581ea6 ./core/update.sh 1cfba599047d84a17ff92b695ebf527a505a30acc9ec21a2b9f410a7ea6dde4b23b5cf62e557d82f2fe9a8980649942424b879ca53baae4d4cb3057681baa7b6 ./core/colors.sh 065cfa39f1b4312ed275ad1039827a24f703176c653a8d27303d145f9d389a60ec5b3a9eb167e060cc6fd093b9c03cfb1a8b70254d444fbc6e62e2297d88b310 ./core/status.sh 2036a79215a5434e31f3406bea3f2ffa7e94ffef86c2d1ceb8865db29f19fe7f342f9cab93288f57c75daed36ef146f85d15f8d633931a27d55c3983f55ef15b ./core/git.sh |