Files
codeql/misc/ripunzip/install.sh
Cornelius Riemenschneider 4c21444dd5 Bazel: Flip --incompatible_use_plus_in_repo_names.
We've hardcoded the tilde in a lot of places :(
This improves performance on Windows and gets us ready for Bazel 8.

We need an upgrade of rules_rust for this to work.
2024-10-09 14:04:05 +02:00

25 lines
436 B
Bash
Executable File

#!/bin/bash
set -eu
source misc/bazel/runfiles.sh 2>/dev/null || source external/ql+/misc/bazel/runfiles.sh
dest="${2:-$HOME/.local/bin}"
if [ ! -d "$dest" ]; then
echo "$dest: not a directory. Provide a valid installation target." >&2
exit 1
fi
source="$(rlocation "$1")"
dest+="/ripunzip"
if [[ "$source" = *.exe ]]; then
dest+=".exe"
fi
cp "$source" "$dest"
echo "installed $("$dest" --version) in $(dirname "$dest")"