diff --git a/install-local.sh b/install-local.sh index 602ae28..81e1345 100755 --- a/install-local.sh +++ b/install-local.sh @@ -32,8 +32,14 @@ initOS() { # initOS discovers the operating system for this system. initCLIPath() { - suffix=$([ "${OS}" = "windows" ] && echo ".exe") - GH_CLI_TMP="libs/${OS}-${ARCH}/github-${OS}-${arch}${suffix}" + suffix="" + + if [ "${OS}" = "windows" ]; then + suffix=".exe" + fi + + GH_CLI_TMP="libs/${OS}-${ARCH}/github${suffix}" + echo "Init CLI Path for ${OS}-${ARCH} (${GH_CLI_TMP})" } # runs the given command as root (detects if we are root already) @@ -50,7 +56,7 @@ runAsRoot() { # verifySupported checks that the os/arch combination is supported for # binary builds. verifySupported() { - + echo "check support ${GH_CLI_TMP}" if [ ! -f "${GH_CLI_TMP}" ]; then echo "No prebuilt binary for ${OS}-${ARCH}." echo "To build from source, go to https://github.com/fulll/github" @@ -80,9 +86,9 @@ checkGithubInstalledVersion() { # installFile verifies the SHA256 for the file, then unpacks and # installs it. installFile() { - echo "Preparing to install $PROJECT_NAME into ${GH_CLI_INSTALL_DIR}" + echo "Preparing to install $PROJECT_NAME from ${GH_CLI_TMP} ${GH_CLI_INSTALL_DIR}" chmod +x "${GH_CLI_TMP}" - runAsRoot cp "${GH_CLI_TMP}" "$GH_CLI_INSTALL_DIR" + runAsRoot cp "${GH_CLI_TMP}" "$GH_CLI_INSTALL_DIR/$PROJECT_NAME" echo "$PROJECT_NAME installed into $GH_CLI_INSTALL_DIR/$PROJECT_NAME" } diff --git a/libs/linux-amd64/github b/libs/linux-amd64/github new file mode 100755 index 0000000..e53e3c5 Binary files /dev/null and b/libs/linux-amd64/github differ