Skip to content

Commit 4db785d

Browse files
authored
feat: make installation directory configurable via INSTALL_DIR env var (#502)
- Allow the installation directory to be customized using the INSTALL_DIR environment variable - Update installation message to reflect the configurable target directory Signed-off-by: appleboy <appleboy.tw@gmail.com>
1 parent a805656 commit 4db785d

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

install.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,9 @@ trap cleanup EXIT INT TERM
113113
exit 1
114114
fi
115115

116-
echo "Installing $BINARY to /usr/local/bin (may require sudo)..."
117-
sudo install -m 0755 "$BINARY" /usr/local/bin/
116+
INSTALL_DIR="${INSTALL_DIR:-/usr/local/bin}"
117+
echo "Installing $BINARY to $INSTALL_DIR (may require sudo)..."
118+
sudo install -m 0755 "$BINARY" "$INSTALL_DIR/"
118119
)
119120

120121
echo "$BINARY installed successfully! Run '$BINARY --help' to get started."

0 commit comments

Comments
 (0)