19 lines
375 B
Bash
Executable File
19 lines
375 B
Bash
Executable File
#!/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"
|
|
printf "Installing licenses to '%s'\n" "$GLOBAL_DATA_PATH"
|
|
rm -rf "$GLOBAL_DATA_PATH"
|
|
cp -R licenses "$GLOBAL_DATA_PATH"
|
|
EOF
|