mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Make ripunzip installer accessible from outside this repo.
* The relative path to misc doesn't work when running from another repo * The buildifier dependency is not available from other repos, therefore we can't pull in //misc/bazel without further refactoring. Therefore, inline the runfiles snippet here.
This commit is contained in:
@@ -9,5 +9,5 @@ sh_binary(
|
||||
srcs = ["install.sh"],
|
||||
args = ["$(rlocationpath :ripunzip)"],
|
||||
data = [":ripunzip"],
|
||||
deps = ["//misc/bazel:sh_runfiles"],
|
||||
deps = ["@bazel_tools//tools/bash/runfiles"],
|
||||
)
|
||||
|
||||
@@ -2,7 +2,16 @@
|
||||
|
||||
set -eu
|
||||
|
||||
. misc/bazel/runfiles.sh
|
||||
# --- begin runfiles.bash initialization v3 ---
|
||||
# Copy-pasted from the Bazel Bash runfiles library v3.
|
||||
set -uo pipefail; set +e; f=bazel_tools/tools/bash/runfiles/runfiles.bash
|
||||
source "${RUNFILES_DIR:-/dev/null}/$f" 2>/dev/null || \
|
||||
source "$(grep -sm1 "^$f " "${RUNFILES_MANIFEST_FILE:-/dev/null}" | cut -f2- -d' ')" 2>/dev/null || \
|
||||
source "$0.runfiles/$f" 2>/dev/null || \
|
||||
source "$(grep -sm1 "^$f " "$0.runfiles_manifest" | cut -f2- -d' ')" 2>/dev/null || \
|
||||
source "$(grep -sm1 "^$f " "$0.exe.runfiles_manifest" | cut -f2- -d' ')" 2>/dev/null || \
|
||||
{ echo>&2 "ERROR: cannot find $f"; exit 1; }; f=; set -e
|
||||
# --- end runfiles.bash initialization v3 ---
|
||||
|
||||
dest="${2:-$HOME/.local/bin}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user