mirror of
https://github.com/Matir/skel.git
synced 2026-07-24 13:16:56 -07:00
Update install_tool
This commit is contained in:
@@ -127,8 +127,10 @@ function get_latest_github_release_url {
|
|||||||
jq -r ".assets[] | select(.name|test(\"${glob}\")) | .browser_download_url"
|
jq -r ".assets[] | select(.name|test(\"${glob}\")) | .browser_download_url"
|
||||||
}
|
}
|
||||||
|
|
||||||
function require_pipx {
|
function require {
|
||||||
command -v pipx >/dev/null 2>&1 || die "Requires pipx"
|
local cmd="${1}"
|
||||||
|
local msg="${2:-Requires ${cmd}}"
|
||||||
|
command -v "${cmd}" >/dev/null 2>&1 || die "${msg}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Begin main tool selection
|
# Begin main tool selection
|
||||||
@@ -288,10 +290,7 @@ case ${TOOL} in
|
|||||||
git clone "${src}" "${DESTDIR}"
|
git clone "${src}" "${DESTDIR}"
|
||||||
;;
|
;;
|
||||||
pwndbg)
|
pwndbg)
|
||||||
if ! command -v gdb > /dev/null 2>&1 ; then
|
require gdb "No gdb available!"
|
||||||
echo 'No gdb available!' >/dev/stderr
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
git clone --depth 1 -b stable https://github.com/pwndbg/pwndbg.git "${DESTDIR}"
|
git clone --depth 1 -b stable https://github.com/pwndbg/pwndbg.git "${DESTDIR}"
|
||||||
PY_PACKAGES=${DESTDIR}/vendor
|
PY_PACKAGES=${DESTDIR}/vendor
|
||||||
mkdir -p "${PY_PACKAGES}"
|
mkdir -p "${PY_PACKAGES}"
|
||||||
@@ -311,10 +310,7 @@ case ${TOOL} in
|
|||||||
;;
|
;;
|
||||||
gef)
|
gef)
|
||||||
makedest_or_die
|
makedest_or_die
|
||||||
if ! command -v gdb > /dev/null 2>&1 ; then
|
require gdb "No gdb available!"
|
||||||
echo 'No gdb available!' >/dev/stderr
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
download \
|
download \
|
||||||
https://github.com/hugsy/gef/raw/master/gef.py \
|
https://github.com/hugsy/gef/raw/master/gef.py \
|
||||||
"${DESTDIR}/gef.py"
|
"${DESTDIR}/gef.py"
|
||||||
@@ -441,25 +437,19 @@ EOF
|
|||||||
add_bin_symlink docker-compose
|
add_bin_symlink docker-compose
|
||||||
;;
|
;;
|
||||||
tldr)
|
tldr)
|
||||||
require_pipx
|
require pipx
|
||||||
pipx install tldr
|
pipx install tldr
|
||||||
;;
|
;;
|
||||||
blint)
|
blint)
|
||||||
require_pipx
|
require pipx
|
||||||
pipx install blint
|
pipx install blint
|
||||||
;;
|
;;
|
||||||
dust)
|
dust)
|
||||||
if ! command -v cargo >/dev/null 2>&1 ; then
|
require cargo "This needs cargo (for rust)!"
|
||||||
echo "This needs cargo (for rust)!" >/dev/stderr
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
cargo install du-dust
|
cargo install du-dust
|
||||||
;;
|
;;
|
||||||
bottom)
|
bottom)
|
||||||
if ! command -v cargo >/dev/null 2>&1 ; then
|
require cargo "This needs cargo (for rust)!"
|
||||||
echo "This needs cargo (for rust)!" >/dev/stderr
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
cargo install bottom
|
cargo install bottom
|
||||||
;;
|
;;
|
||||||
delta)
|
delta)
|
||||||
@@ -527,14 +517,11 @@ EOF
|
|||||||
sh "${rustup_init}" --no-modify-path -y
|
sh "${rustup_init}" --no-modify-path -y
|
||||||
;;
|
;;
|
||||||
igrep)
|
igrep)
|
||||||
if ! command -v cargo >/dev/null 2>&1 ; then
|
require cargo "This needs cargo (for rust)!"
|
||||||
echo "This needs cargo (for rust)!" >/dev/stderr
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
cargo install igrep
|
cargo install igrep
|
||||||
;;
|
;;
|
||||||
unblob)
|
unblob)
|
||||||
require_pipx
|
require pipx
|
||||||
pipx install unblob
|
pipx install unblob
|
||||||
;;
|
;;
|
||||||
fq)
|
fq)
|
||||||
@@ -555,6 +542,14 @@ EOF
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
speckit)
|
||||||
|
require uv
|
||||||
|
latest_version=$(curl -s "https://api.github.com/repos/github/spec-kit/releases/latest" | jq -r '.tag_name')
|
||||||
|
if [ -z "${latest_version}" ] || [ "${latest_version}" = "null" ]; then
|
||||||
|
die "Failed to determine latest release version for speckit."
|
||||||
|
fi
|
||||||
|
uv tool install specify-cli --from "git+https://github.com/github/spec-kit.git@${latest_version}"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Unknown tool: ${TOOL}" >/dev/stderr
|
echo "Unknown tool: ${TOOL}" >/dev/stderr
|
||||||
list_tools
|
list_tools
|
||||||
|
|||||||
Reference in New Issue
Block a user