mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
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.
25 lines
436 B
Bash
Executable File
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")"
|