Files

20 lines
441 B
Bash
Raw Permalink Normal View History

2022-11-02 14:50:36 -07:00
#!/bin/sh -e
2022-10-06 22:34:56 -07:00
PREFIX="/usr/local"
if [ "$#" -ge 1 ]; then
PREFIX="$1"
fi
export GLOBAL_DATA_PATH="$PREFIX/share/license-tool"
2022-11-02 14:50:36 -07:00
cargo clean --release
cargo build --release
2022-10-06 22:34:56 -07:00
2022-11-02 14:50:36 -07:00
sudo sh << EOF
cp target/release/license-tool "$PREFIX/bin/license-tool"
2023-05-01 17:31:06 -07:00
cp _license-tool "$PREFIX/share/zsh/site-functions/_license-tool"
printf "Installing licenses to '%s'\n" "$GLOBAL_DATA_PATH"
rm -rf "$GLOBAL_DATA_PATH"
cp -R licenses "$GLOBAL_DATA_PATH"
2022-11-02 14:50:36 -07:00
EOF