Skip to content

Commit

Permalink
Rebuilt install.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
maouw committed Oct 25, 2023
1 parent 2438b96 commit 34fa2dc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ ssh [email protected]
After you've connected to the login node, you can download and install `hyakvnc` by running the following command. Copy and paste it into the terminal window where you are connected to the login node and press enter:

```bash
eval "$(curl -fsSL https://raw.githubusercontent.com//maouw/hyakvnc/autoupdate/install.sh)"
eval "$(curl -fsSL https://raw.githubusercontent.com//maouw/hyakvnc/update-test/install.sh)"
```

This will download and install `hyakvnc` to your `~/.local/bin` directory and add it to your `$PATH` so you can run it by typing `hyakvnc` into the terminal window.
Expand Down
5 changes: 3 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# These locations can be changed by setting the following environment variables:
# - HYAKVNC_DIR: Local directory to store application data (default: `$HOME/.hyakvnc`)
# - HYAKVNC_REPO_DIR: Local directory to store git repository (default: `$HYAKVNC_DIR/hyakvnc`)
# - HYAKVNC_REPO_URL: URL of the git repository to clone (default: https://github.com/maouw/hyakvnc)
# - HYAKVNC_REPO_URL: URL of the git repository to clone (default: )
# - BIN_INSTALL_DIR: Local directory to store executable (default: `$HOME/.local/bin`)

_add_hyakvnc_to_path() {
Expand Down Expand Up @@ -37,6 +37,7 @@ _install_hyakvnc() {
_HYAKVNC_DIR="${_HYAKVNC_DIR:-${HOME}/.hyakvnc}" # %% Local directory to store application data (default: `$HOME/.hyakvnc`)
_HYAKVNC_REPO_DIR="${_HYAKVNC_REPO_DIR:-${_HYAKVNC_DIR}/hyakvnc}" # Local directory to store git repository (default: `$HYAKVNC_DIR/hyakvnc`)
_HYAKVNC_REPO_URL="${_HYAKVNC_REPO_URL:-"https://github.com/maouw/hyakvnc"}"
_HYAKVNC_REPO_BRANCH="${_HYAKVNC_REPO_BRANCH:-"update-test"}"

# shellcheck disable=SC2016
_UNEXPANDED_BIN_INSTALL_DIR='${HOME}/.local/bin' # Local directory to store executable (default: `$HOME/.local/bin`)
Expand All @@ -46,7 +47,7 @@ _install_hyakvnc() {
mkdir -p "${_BIN_INSTALL_DIR}" &&
rm -rf "${_HYAKVNC_DIR}/hyakvnc-tmp" &&
echo "Fetching hyakvnc from ${_HYAKVNC_REPO_URL}" 2>&1 &&
git clone --depth 1 --single-branch --quiet "${_HYAKVNC_REPO_URL}" ~/.hyakvnc/hyakvnc-tmp &&
git clone --branch "${_HYAKVNC_REPO_BRANCH}" --depth 1 --single-branch --quiet "${_HYAKVNC_REPO_URL}" ~/.hyakvnc/hyakvnc-tmp &&
rm -rf "${_HYAKVNC_REPO_DIR}" &&
mv "${_HYAKVNC_DIR}/hyakvnc-tmp" "${_HYAKVNC_REPO_DIR}" &&
ln -sf "${_HYAKVNC_REPO_DIR}/hyakvnc" "${_BIN_INSTALL_DIR}/hyakvnc" &&
Expand Down

0 comments on commit 34fa2dc

Please sign in to comment.