Skip to content

Commit

Permalink
Update documentation and installer
Browse files Browse the repository at this point in the history
  • Loading branch information
maouw committed Oct 25, 2023
1 parent 390801e commit 2438b96
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .build/install.j2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ _add_hyakvnc_to_path() {
_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:-"{{j2_hyakvnc_repo_url}}"}"
_HYAKVNC_REPO_URL="${_HYAKVNC_REPO_URL:-"{{ github_repository }}"}"
_HYAKVNC_REPO_BRANCH="${_HYAKVNC_REPO_BRANCH:-"{{ github_ref_name }}"}"

# 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
2 changes: 1 addition & 1 deletion .github/workflows/build-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
sed -E '/^HYAKVNC_.*#\s*%%/!d; s/=.*(#\s*%%)/:/g; s/(^.)/- \1/g' ../hyakvnc > config.inc.md
for x in create status show stop config update install; do ../hyakvnc help "$x" | sed -E '1 s/(.*)/\n### \1\n/; 2 s/^$/```text/' | pr -e4 -t && echo '```'; done > usage.inc.md
jinja -D github_repository "${{ github.repository }}" -D github_ref_name "${{ github.ref_name }}" README.j2.md | sed 's/^.*<!-- markdownlint-disable-file -->.*$//g' > ../README.md
jinja -D j2_hyakvnc_repo_url 'https://github.com/${{ github.repository }}' install.j2.sh -o ../install.sh
jinja -D github_repository 'https://github.com/${{ github.repository }}' -D github_ref_name '${{ github.ref_name }}' install.j2.sh -o ../install.sh
popd
git config --local user.email "${{ github.event.sender.id }}+${{ github.event.sender.login }}@users.noreply.github.com"
Expand Down

0 comments on commit 2438b96

Please sign in to comment.