1234567891011121314151617181920 |
- #!/bin/sh -e
- PREFIX="/usr/local"
- if [ "$#" -ge 1 ]; then
- PREFIX="$1"
- fi
- export GLOBAL_DATA_PATH="$PREFIX/share/license-tool"
- cargo clean --release
- cargo build --release
- sudo sh << EOF
- cp target/release/license-tool "$PREFIX/bin/license-tool"
- 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"
- EOF
|