diff --git a/README.md b/README.md index 7b77725..2ae7b5b 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ ssh your-uw-netid@klone.hyak.uw.edu 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. diff --git a/install.sh b/install.sh index 9f5d66f..9483e84 100644 --- a/install.sh +++ b/install.sh @@ -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() { @@ -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`) @@ -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" &&