add install target to build script
This commit is contained in:
parent
4d70dd03be
commit
3dccce8a81
1 changed files with 17 additions and 0 deletions
17
pxl8.sh
17
pxl8.sh
|
|
@ -104,6 +104,7 @@ print_usage() {
|
||||||
echo " build Build pxl8"
|
echo " build Build pxl8"
|
||||||
echo " clean Remove build artifacts"
|
echo " clean Remove build artifacts"
|
||||||
echo " help Show this help message"
|
echo " help Show this help message"
|
||||||
|
echo " install Install pxl8 to ~/.local/bin"
|
||||||
echo " run Build and run pxl8 (optional: cart.pxc or folder)"
|
echo " run Build and run pxl8 (optional: cart.pxc or folder)"
|
||||||
echo " update Download/update all dependencies"
|
echo " update Download/update all dependencies"
|
||||||
echo " vendor Fetch source for dependencies (ex. SDL3)"
|
echo " vendor Fetch source for dependencies (ex. SDL3)"
|
||||||
|
|
@ -468,6 +469,22 @@ case "$COMMAND" in
|
||||||
update_sdl
|
update_sdl
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
install)
|
||||||
|
"$0" build --release || exit 1
|
||||||
|
|
||||||
|
INSTALL_DIR="${HOME}/.local/bin"
|
||||||
|
mkdir -p "$INSTALL_DIR"
|
||||||
|
|
||||||
|
cp "bin/release/pxl8" "$INSTALL_DIR/pxl8"
|
||||||
|
chmod +x "$INSTALL_DIR/pxl8"
|
||||||
|
|
||||||
|
print_info "Installed pxl8 to $INSTALL_DIR/pxl8"
|
||||||
|
|
||||||
|
if [[ ":$PATH:" != *":$INSTALL_DIR:"* ]]; then
|
||||||
|
print_info "Note: Add $INSTALL_DIR to your PATH if not already"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
ase)
|
ase)
|
||||||
bash tools/aseprite/pxl8-ase.sh "$@"
|
bash tools/aseprite/pxl8-ase.sh "$@"
|
||||||
;;
|
;;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue