mirror of
https://github.com/Matir/skel.git
synced 2026-05-25 21:19:09 -07:00
Update install_tool
This commit is contained in:
157
bin/install_tool
157
bin/install_tool
@@ -2,6 +2,9 @@
|
|||||||
|
|
||||||
set -ue
|
set -ue
|
||||||
|
|
||||||
|
TMPDIR=$(mktemp -d)
|
||||||
|
trap 'rm -rf -- "${TMPDIR}"' EXIT
|
||||||
|
|
||||||
REINSTALL=0
|
REINSTALL=0
|
||||||
PACKAGES=1
|
PACKAGES=1
|
||||||
|
|
||||||
@@ -72,8 +75,7 @@ function download {
|
|||||||
SRC=${1}
|
SRC=${1}
|
||||||
DST=${2}
|
DST=${2}
|
||||||
echo -n "Downloading ${SRC} to ${DST}..." >&2
|
echo -n "Downloading ${SRC} to ${DST}..." >&2
|
||||||
# TODO: consider curl instead?
|
curl -fL -o "${DST}" "${SRC}"
|
||||||
wget --no-server-response -q -O "${DST}" --content-disposition "${SRC}"
|
|
||||||
echo " done." >&2
|
echo " done." >&2
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -118,6 +120,13 @@ function deb_only {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function get_latest_github_release_url {
|
||||||
|
local repo="$1"
|
||||||
|
local glob="$2"
|
||||||
|
curl -s "https://api.github.com/repos/${repo}/releases/latest" | \
|
||||||
|
jq -r ".assets[] | select(.name|test(\"${glob}\")) | .browser_download_url"
|
||||||
|
}
|
||||||
|
|
||||||
function require_pipx {
|
function require_pipx {
|
||||||
command -v pipx >/dev/null 2>&1 || die "Requires pipx"
|
command -v pipx >/dev/null 2>&1 || die "Requires pipx"
|
||||||
}
|
}
|
||||||
@@ -129,12 +138,12 @@ case ${TOOL} in
|
|||||||
install_pkgs libssl-dev git build-essential yasm libgmp-dev libpcap-dev \
|
install_pkgs libssl-dev git build-essential yasm libgmp-dev libpcap-dev \
|
||||||
pkg-config libbz2-dev libopenmpi-dev openmpi-bin libnss3-dev \
|
pkg-config libbz2-dev libopenmpi-dev openmpi-bin libnss3-dev \
|
||||||
libkrb5-dev libgmp-dev
|
libkrb5-dev libgmp-dev
|
||||||
jtemp=$(mktemp -d)
|
jtemp="${TMPDIR}/john"
|
||||||
|
mkdir -p "${jtemp}"
|
||||||
git clone https://github.com/magnumripper/JohnTheRipper.git "${jtemp}/john"
|
git clone https://github.com/magnumripper/JohnTheRipper.git "${jtemp}/john"
|
||||||
cd "${jtemp}/john/src"
|
cd "${jtemp}/john/src" || exit
|
||||||
./configure && make -sj2
|
./configure && make -sj2
|
||||||
cp -r "${jtemp}"/john/run/* "${DESTDIR}"
|
cp -r "${jtemp}"/john/run/* "${DESTDIR}"
|
||||||
rm -rf "${jtemp}"
|
|
||||||
# Persistent files
|
# Persistent files
|
||||||
mkdir -p "${HOME}/.john"
|
mkdir -p "${HOME}/.john"
|
||||||
touch "${HOME}/.john/john.pot"
|
touch "${HOME}/.john/john.pot"
|
||||||
@@ -144,15 +153,15 @@ case ${TOOL} in
|
|||||||
wordlists)
|
wordlists)
|
||||||
makedest
|
makedest
|
||||||
download \
|
download \
|
||||||
http://downloads.skullsecurity.org/passwords/rockyou.txt.bz2 \
|
"http://downloads.skullsecurity.org/passwords/rockyou.txt.bz2" \
|
||||||
"${DESTDIR}/rockyou.txt.bz2"
|
"${DESTDIR}/rockyou.txt.bz2"
|
||||||
bunzip2 "${DESTDIR}/rockyou.txt.bz2"
|
bunzip2 "${DESTDIR}/rockyou.txt.bz2"
|
||||||
download \
|
download \
|
||||||
http://downloads.skullsecurity.org/passwords/phpbb.txt.bz2 \
|
"http://downloads.skullsecurity.org/passwords/phpbb.txt.bz2" \
|
||||||
"${DESTDIR}/phpbb.txt.bz2"
|
"${DESTDIR}/phpbb.txt.bz2"
|
||||||
bunzip2 "${DESTDIR}/phpbb.txt.bz2"
|
bunzip2 "${DESTDIR}/phpbb.txt.bz2"
|
||||||
download \
|
download \
|
||||||
http://downloads.skullsecurity.org/passwords/hak5.txt.bz2 \
|
"http://downloads.skullsecurity.org/passwords/hak5.txt.bz2" \
|
||||||
"${DESTDIR}/hak5.txt.bz2"
|
"${DESTDIR}/hak5.txt.bz2"
|
||||||
bunzip2 "${DESTDIR}/hak5.txt.bz2"
|
bunzip2 "${DESTDIR}/hak5.txt.bz2"
|
||||||
;;
|
;;
|
||||||
@@ -165,19 +174,15 @@ case ${TOOL} in
|
|||||||
gcloud)
|
gcloud)
|
||||||
makedest_or_die
|
makedest_or_die
|
||||||
gbase="https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/"
|
gbase="https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/"
|
||||||
# TODO: find a way to make this version independent
|
gsdk=$(curl -s https://cloud.google.com/sdk/docs/install-sdk | grep -o "google-cloud-sdk-[0-9.]*-linux-x86_64.tar.gz" | head -n 1)
|
||||||
gsdk="google-cloud-sdk-385.0.0-linux-x86_64.tar.gz"
|
download "${gbase}${gsdk}" "${TMPDIR}/gcloud.tar.gz"
|
||||||
download "${gbase}${gsdk}" /tmp/gcloud.tar.gz
|
tar zxf "${TMPDIR}/gcloud.tar.gz" --strip-components=1 -C "${DESTDIR}"
|
||||||
tar zxf /tmp/gcloud.tar.gz --strip-components=1 -C "${DESTDIR}"
|
|
||||||
rm /tmp/gcloud.tar.gz
|
|
||||||
add_bin_symlink bin/gcloud
|
add_bin_symlink bin/gcloud
|
||||||
;;
|
;;
|
||||||
android-sdk)
|
android-sdk)
|
||||||
# TODO: find a way to make this version independent
|
asdk=$(curl -s https://developer.android.com/studio/releases/platform-tools | grep -o "https://dl.google.com/android/repository/platform-tools_r[0-9.]*-linux.zip" | head -n 1)
|
||||||
asdk="https://dl.google.com/android/repository/platform-tools_r31.0.2-linux.zip"
|
download "${asdk}" "${TMPDIR}/android-tools.zip"
|
||||||
download ${asdk} /tmp/android-tools.zip
|
unzip -d "${DESTDIR}" "${TMPDIR}/android-tools.zip"
|
||||||
unzip -d "${DESTDIR}" /tmp/android-tools.zip
|
|
||||||
rm /tmp/android-tools.zip
|
|
||||||
# Install components
|
# Install components
|
||||||
"${DESTDIR}/tools/bin/sdkmanager" "emulator" "platform-tools"
|
"${DESTDIR}/tools/bin/sdkmanager" "emulator" "platform-tools"
|
||||||
;;
|
;;
|
||||||
@@ -198,12 +203,10 @@ case ${TOOL} in
|
|||||||
;;
|
;;
|
||||||
mitmproxy)
|
mitmproxy)
|
||||||
makedest_or_die
|
makedest_or_die
|
||||||
ver=$(python3 -c 'from urllib import request; import json; print(json.load(request.urlopen("https://api.github.com/repos/mitmproxy/mitmproxy/releases/latest"))["tag_name"].replace("v",""))')
|
|
||||||
download \
|
download \
|
||||||
"https://snapshots.mitmproxy.org/${ver}/mitmproxy-${ver}-linux.tar.gz" \
|
"$(get_latest_github_release_url "mitmproxy/mitmproxy" ".*-linux\\.tar\\.gz")" \
|
||||||
/tmp/mitmproxy.tar.gz
|
"${TMPDIR}/mitmproxy.tar.gz"
|
||||||
tar zx -C "${DESTDIR}" -f /tmp/mitmproxy.tar.gz
|
tar zx -C "${DESTDIR}" -f "${TMPDIR}/mitmproxy.tar.gz"
|
||||||
rm /tmp/mitmproxy.tar.gz
|
|
||||||
add_bin_symlink mitmproxy
|
add_bin_symlink mitmproxy
|
||||||
add_bin_symlink mitmweb
|
add_bin_symlink mitmweb
|
||||||
add_bin_symlink mitmdump
|
add_bin_symlink mitmdump
|
||||||
@@ -211,20 +214,18 @@ case ${TOOL} in
|
|||||||
esp)
|
esp)
|
||||||
makedest_or_die
|
makedest_or_die
|
||||||
src="https://dl.espressif.com/dl/xtensa-esp32-elf-linux64-1.22.0-61-gab8375a-5.2.0.tar.gz"
|
src="https://dl.espressif.com/dl/xtensa-esp32-elf-linux64-1.22.0-61-gab8375a-5.2.0.tar.gz"
|
||||||
download ${src} /tmp/esp32.tar.gz
|
download "${src}" "${TMPDIR}/esp32.tar.gz"
|
||||||
tar zx -C "${DESTDIR}" -f /tmp/esp32.tar.gz
|
tar zx -C "${DESTDIR}" -f "${TMPDIR}/esp32.tar.gz"
|
||||||
rm /tmp/esp32.tar.gz
|
|
||||||
git clone --recursive https://github.com/espressif/esp-idf.git "${DESTDIR}/esp-idf"
|
git clone --recursive https://github.com/espressif/esp-idf.git "${DESTDIR}/esp-idf"
|
||||||
;;
|
;;
|
||||||
dex2jar)
|
dex2jar)
|
||||||
makedest_or_die
|
makedest_or_die
|
||||||
src="https://github.com/pxb1988/dex2jar/releases/download/v2.4/dex-tools-v2.4.zip"
|
src="https://github.com/pxb1988/dex2jar/releases/download/v2.4/dex-tools-v2.4.zip"
|
||||||
download ${src} /tmp/dex2jar.zip
|
download "${src}" "${TMPDIR}/dex2jar.zip"
|
||||||
tmpd=$(mktemp -d)
|
tmpd="${TMPDIR}/dex2jar"
|
||||||
unzip -d "${tmpd}" /tmp/dex2jar.zip
|
mkdir -p "${tmpd}"
|
||||||
|
unzip -d "${tmpd}" "${TMPDIR}/dex2jar.zip"
|
||||||
mv "${tmpd}"/dex-tools-*/* "${DESTDIR}"
|
mv "${tmpd}"/dex-tools-*/* "${DESTDIR}"
|
||||||
rm /tmp/dex2jar.zip
|
|
||||||
rm -rf "${tmpd}"
|
|
||||||
rm "${DESTDIR}"/*.bat
|
rm "${DESTDIR}"/*.bat
|
||||||
chmod +x "${DESTDIR}"/*.sh
|
chmod +x "${DESTDIR}"/*.sh
|
||||||
;;
|
;;
|
||||||
@@ -234,11 +235,11 @@ case ${TOOL} in
|
|||||||
gcc-arm-none-eabi libstdc++-arm-none-eabi-newlib
|
gcc-arm-none-eabi libstdc++-arm-none-eabi-newlib
|
||||||
src="https://github.com/Proxmark/proxmark3.git"
|
src="https://github.com/Proxmark/proxmark3.git"
|
||||||
git clone "${src}" "${DESTDIR}"
|
git clone "${src}" "${DESTDIR}"
|
||||||
cd "${DESTDIR}"
|
cd "${DESTDIR}" || exit
|
||||||
make -sj2
|
make -sj2
|
||||||
check_sudo && sudo /bin/sh -c \
|
check_sudo && sudo /bin/sh -c \
|
||||||
"cp -rf driver/78-mm-usb-device-blacklist.rules \
|
"cp -rf driver/78-mm-usb-device-blacklist.rules \
|
||||||
/etc/udev/rules.d/77-mm-usb-device-blacklist.rules &&
|
/etc/udev/rules.d/77-mm-usb-device-blacklist.rules &&\
|
||||||
udevadm control --reload-rules"
|
udevadm control --reload-rules"
|
||||||
;;
|
;;
|
||||||
pm3iceman)
|
pm3iceman)
|
||||||
@@ -249,19 +250,20 @@ case ${TOOL} in
|
|||||||
libbz2-dev libbluetooth-dev libpython3-dev libssl-dev
|
libbz2-dev libbluetooth-dev libpython3-dev libssl-dev
|
||||||
src="https://github.com/RfidResearchGroup/proxmark3.git"
|
src="https://github.com/RfidResearchGroup/proxmark3.git"
|
||||||
git clone "${src}" "${DESTDIR}"
|
git clone "${src}" "${DESTDIR}"
|
||||||
cd "${DESTDIR}"
|
cd "${DESTDIR}" || exit
|
||||||
make clean && make -sj2
|
make clean && make -sj2
|
||||||
check_sudo && sudo /bin/sh -c \
|
check_sudo && sudo /bin/sh -c \
|
||||||
"cp -rf ./driver/77-pm3-usb-device-blacklist.rules \
|
"cp -rf ./driver/77-pm3-usb-device-blacklist.rules \
|
||||||
/etc/udev/rules.d/77-pm3-usb-device-blacklist.rules &&
|
/etc/udev/rules.d/77-pm3-usb-device-blacklist.rules &&\
|
||||||
udevadm control --reload-rules"
|
udevadm control --reload-rules"
|
||||||
add_bin_symlink pm3
|
add_bin_symlink pm3
|
||||||
;;
|
;;
|
||||||
cyberchef)
|
cyberchef)
|
||||||
makedest
|
makedest
|
||||||
cd "${DESTDIR}"
|
cd "${DESTDIR}" || exit
|
||||||
src=$(python3 -c 'from urllib import request; import json; print(json.load(request.urlopen("https://api.github.com/repos/gchq/CyberChef/releases/latest"))["assets"][0]["browser_download_url"])')
|
download \
|
||||||
download "${src}" "${DESTDIR}/cyberchef.zip"
|
"$(get_latest_github_release_url "gchq/CyberChef" ".*\\.zip")" \
|
||||||
|
"${DESTDIR}/cyberchef.zip"
|
||||||
unzip -d "${DESTDIR}" "${DESTDIR}/cyberchef.zip"
|
unzip -d "${DESTDIR}" "${DESTDIR}/cyberchef.zip"
|
||||||
ln -sf CyberChef*.html "${DESTDIR}/cyberchef.html"
|
ln -sf CyberChef*.html "${DESTDIR}/cyberchef.html"
|
||||||
;;
|
;;
|
||||||
@@ -270,8 +272,9 @@ case ${TOOL} in
|
|||||||
download \
|
download \
|
||||||
https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/linux/apktool \
|
https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/linux/apktool \
|
||||||
"${DESTDIR}/apktool"
|
"${DESTDIR}/apktool"
|
||||||
|
jar_url=$(curl -s https://bitbucket.org/iBotPeaches/apktool/downloads/ | grep -o "/iBotPeaches/apktool/downloads/apktool_[0-9.]*.jar" | head -n 1)
|
||||||
download \
|
download \
|
||||||
https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_2.3.3.jar \
|
"https://bitbucket.org${jar_url}" \
|
||||||
"${DESTDIR}/apktool.jar"
|
"${DESTDIR}/apktool.jar"
|
||||||
chmod +x "${DESTDIR}/apktool"
|
chmod +x "${DESTDIR}/apktool"
|
||||||
add_bin_symlink apktool
|
add_bin_symlink apktool
|
||||||
@@ -328,22 +331,18 @@ case ${TOOL} in
|
|||||||
;;
|
;;
|
||||||
cura)
|
cura)
|
||||||
makedest
|
makedest
|
||||||
ver=$(python3 -c 'from urllib import request; import json; print(json.load(request.urlopen("https://api.github.com/repos/Ultimaker/Cura/releases/latest"))["name"].replace("v",""))')
|
|
||||||
echo "Latest Cura is ${ver}"
|
|
||||||
download \
|
download \
|
||||||
"https://github.com/Ultimaker/Cura/releases/download/${ver}/Cura-${ver}.AppImage" \
|
"$(get_latest_github_release_url "Ultimaker/Cura" ".*\\.AppImage")" \
|
||||||
"${DESTDIR}/Cura.AppImage"
|
"${DESTDIR}/Cura.AppImage"
|
||||||
chmod +x "${DESTDIR}/Cura.AppImage"
|
chmod +x "${DESTDIR}/Cura.AppImage"
|
||||||
add_bin_symlink "Cura.AppImage" cura
|
add_bin_symlink "Cura.AppImage" cura
|
||||||
;;
|
;;
|
||||||
rr)
|
rr)
|
||||||
deb_only
|
deb_only
|
||||||
ver=$(python3 -c 'from urllib import request; import json; print(json.load(request.urlopen("https://api.github.com/repos/mozilla/rr/releases/latest"))["name"])')
|
|
||||||
echo "Latest rr is ${ver}"
|
|
||||||
download \
|
download \
|
||||||
"https://github.com/mozilla/rr/releases/download/${ver}/rr-${ver}-Linux-$(uname -m).deb" \
|
"$(get_latest_github_release_url "mozilla/rr" ".*-Linux-.*\\.deb")" \
|
||||||
"/tmp/rr.deb"
|
"${TMPDIR}/rr.deb"
|
||||||
sudo dpkg -i /tmp/rr.deb
|
sudo dpkg -i "${TMPDIR}/rr.deb"
|
||||||
;;
|
;;
|
||||||
nmap-parse-output)
|
nmap-parse-output)
|
||||||
git clone --depth 1 \
|
git clone --depth 1 \
|
||||||
@@ -362,35 +361,35 @@ EOF
|
|||||||
install_pkgs cmake libevdev-dev libudev-dev libconfig++-dev checkinstall
|
install_pkgs cmake libevdev-dev libudev-dev libconfig++-dev checkinstall
|
||||||
git clone "https://github.com/PixlOne/logiops.git" "${DESTDIR}"
|
git clone "https://github.com/PixlOne/logiops.git" "${DESTDIR}"
|
||||||
mkdir -p "${DESTDIR}/build"
|
mkdir -p "${DESTDIR}/build"
|
||||||
cd "${DESTDIR}/build"
|
cd "${DESTDIR}/build" || exit
|
||||||
cmake ..
|
cmake ..
|
||||||
make
|
make
|
||||||
sudo checkinstall --pkgname logiops --maintainer "${USER}" -y
|
sudo checkinstall --pkgname logiops --maintainer "${USER}" -y
|
||||||
;;
|
;;
|
||||||
aws)
|
aws)
|
||||||
DN=$(mktemp -d)
|
DN="${TMPDIR}/aws"
|
||||||
cd "${DN}"
|
mkdir -p "${DN}"
|
||||||
|
cd "${DN}" || exit
|
||||||
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "${DN}/awscliv2.zip"
|
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "${DN}/awscliv2.zip"
|
||||||
unzip "${DN}/awscliv2.zip"
|
unzip "${DN}/awscliv2.zip"
|
||||||
mv "${DN}/aws/dist" "${DESTDIR}"
|
mv "${DN}/aws/dist" "${DESTDIR}"
|
||||||
add_bin_symlink aws
|
add_bin_symlink aws
|
||||||
rm -rf ${DN}
|
|
||||||
;;
|
;;
|
||||||
tmpmail)
|
tmpmail)
|
||||||
install_pkgs curl w3m jq
|
install_pkgs curl w3m jq
|
||||||
mkdir -p ${DESTDIR}
|
mkdir -p "${DESTDIR}"
|
||||||
curl -L "https://git.io/tmpmail" > ${DESTDIR}/tmpmail
|
curl -L "https://git.io/tmpmail" > "${DESTDIR}"/tmpmail
|
||||||
chmod +x ${DESTDIR}/tmpmail
|
chmod +x "${DESTDIR}"/tmpmail
|
||||||
add_bin_symlink tmpmail
|
add_bin_symlink tmpmail
|
||||||
;;
|
;;
|
||||||
gf)
|
gf)
|
||||||
install_pkgs golang-go silversearcher-ag
|
install_pkgs golang-go silversearcher-ag
|
||||||
go install github.com/tomnomnom/gf@latest
|
go install github.com/tomnomnom/gf@latest
|
||||||
mkdir -p ${HOME}/.config
|
mkdir -p "${HOME}"/.config
|
||||||
if test -d ${HOME}/.config/gf ; then
|
if test -d "${HOME}"/.config/gf ; then
|
||||||
git -C ${HOME}/.config/gf pull
|
git -C "${HOME}"/.config/gf pull
|
||||||
else
|
else
|
||||||
git clone https://github.com/Matir/gf-patterns.git ${HOME}/.config/gf
|
git clone https://github.com/Matir/gf-patterns.git "${HOME}"/.config/gf
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
gron)
|
gron)
|
||||||
@@ -410,9 +409,9 @@ EOF
|
|||||||
;;
|
;;
|
||||||
cht.sh)
|
cht.sh)
|
||||||
install_pkgs rlwrap
|
install_pkgs rlwrap
|
||||||
mkdir -p ${DESTDIR}
|
mkdir -p "${DESTDIR}"
|
||||||
curl https://cht.sh/:cht.sh > ${DESTDIR}/cht.sh
|
curl https://cht.sh/:cht.sh > "${DESTDIR}"/cht.sh
|
||||||
chmod +x ${DESTDIR}/cht.sh
|
chmod +x "${DESTDIR}"/cht.sh
|
||||||
add_bin_symlink cht.sh
|
add_bin_symlink cht.sh
|
||||||
;;
|
;;
|
||||||
age)
|
age)
|
||||||
@@ -420,9 +419,10 @@ EOF
|
|||||||
go install filippo.io/age/cmd/age-keygen@latest
|
go install filippo.io/age/cmd/age-keygen@latest
|
||||||
;;
|
;;
|
||||||
docker-compose)
|
docker-compose)
|
||||||
mkdir -p ${DESTDIR}
|
mkdir -p "${DESTDIR}"
|
||||||
|
latest_version=$(curl -s "https://api.github.com/repos/docker/compose/releases/latest" | jq -r '.tag_name')
|
||||||
curl -L \
|
curl -L \
|
||||||
"https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" \
|
"https://github.com/docker/compose/releases/download/${latest_version}/docker-compose-$(uname -s)-$(uname -m)" \
|
||||||
-o "${DESTDIR}/docker-compose"
|
-o "${DESTDIR}/docker-compose"
|
||||||
chmod +x "${DESTDIR}/docker-compose"
|
chmod +x "${DESTDIR}/docker-compose"
|
||||||
add_bin_symlink docker-compose
|
add_bin_symlink docker-compose
|
||||||
@@ -455,9 +455,8 @@ EOF
|
|||||||
echo "Must be able to run as sudo."
|
echo "Must be able to run as sudo."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
dpkg_url=$(curl https://api.github.com/repos/dandavison/delta/releases/latest | \
|
dpkg_url=$(get_latest_github_release_url "dandavison/delta" ".*_amd64.deb")
|
||||||
jq -r '.assets[] | select(.name|test(".*_amd64.deb")) | select(.name|test(".*musl.*")|not) | .browser_download_url')
|
dpkg_name="${TMPDIR}/delta_amd64.deb"
|
||||||
dpkg_name="/tmp/delta_amd64.deb"
|
|
||||||
download "${dpkg_url}" "${dpkg_name}"
|
download "${dpkg_url}" "${dpkg_name}"
|
||||||
sudo dpkg -i "${dpkg_name}"
|
sudo dpkg -i "${dpkg_name}"
|
||||||
;;
|
;;
|
||||||
@@ -478,36 +477,34 @@ EOF
|
|||||||
ln -sf "${DESTDIR}/completion/_kubens.zsh" "${COMPDIR}"
|
ln -sf "${DESTDIR}/completion/_kubens.zsh" "${COMPDIR}"
|
||||||
;;
|
;;
|
||||||
starship)
|
starship)
|
||||||
mkdir -p ${DESTDIR}
|
mkdir -p "${DESTDIR}"
|
||||||
download \
|
download \
|
||||||
"https://github.com/starship/starship/releases/latest/download/starship-$(uname -m)-unknown-linux-musl.tar.gz" \
|
"https://github.com/starship/starship/releases/latest/download/starship-$(uname -m)-unknown-linux-musl.tar.gz" \
|
||||||
/tmp/starship.tar.gz
|
"${TMPDIR}/starship.tar.gz"
|
||||||
tar -C ${DESTDIR} -zxf /tmp/starship.tar.gz starship
|
tar -C "${DESTDIR}" -zxf "${TMPDIR}/starship.tar.gz" starship
|
||||||
add_bin_symlink starship
|
add_bin_symlink starship
|
||||||
;;
|
;;
|
||||||
arduino-cli)
|
arduino-cli)
|
||||||
mkdir -p "${DESTDIR}"
|
mkdir -p "${DESTDIR}"
|
||||||
download \
|
download \
|
||||||
"https://downloads.arduino.cc/arduino-cli/arduino-cli_latest_Linux_64bit.tar.gz" \
|
"https://downloads.arduino.cc/arduino-cli/arduino-cli_latest_Linux_64bit.tar.gz" \
|
||||||
/tmp/arduino-cli.tar.gz
|
"${TMPDIR}/arduino-cli.tar.gz"
|
||||||
tar -C "${DESTDIR}" -zxf /tmp/arduino-cli.tar.gz arduino-cli
|
tar -C "${DESTDIR}" -zxf "${TMPDIR}/arduino-cli.tar.gz" arduino-cli
|
||||||
add_bin_symlink arduino-cli
|
add_bin_symlink arduino-cli
|
||||||
;;
|
;;
|
||||||
ghidra)
|
ghidra)
|
||||||
zip_url=$(curl https://api.github.com/repos/NationalSecurityAgency/ghidra/releases/latest | \
|
zip_url=$(get_latest_github_release_url "NationalSecurityAgency/ghidra" ".*\\.zip")
|
||||||
jq -r '.assets[] | select(.name|test(".*.zip")) | .browser_download_url')
|
download "${zip_url}" "${TMPDIR}/ghidra.zip"
|
||||||
download "${zip_url}" /tmp/ghidra.zip
|
unzip -d "${DESTDIR}" "${TMPDIR}/ghidra.zip"
|
||||||
unzip -d "${DESTDIR}" /tmp/ghidra.zip
|
mv "${DESTDIR}"/*/* "${DESTDIR}"
|
||||||
mv ${DESTDIR}/*/* ${DESTDIR}
|
|
||||||
add_bin_symlink ghidraRun ghidra
|
add_bin_symlink ghidraRun ghidra
|
||||||
;;
|
;;
|
||||||
doctl)
|
doctl)
|
||||||
# TODO: other architectures
|
# TODO: other architectures
|
||||||
tar_url=$(curl https://api.github.com/repos/digitalocean/doctl/releases/latest | \
|
tar_url=$(get_latest_github_release_url "digitalocean/doctl" ".*linux-amd64\\.tar\\.gz")
|
||||||
jq -r '.assets[] | select(.name|test(".*linux-amd64\\.tar\\.gz")) | .browser_download_url')
|
download "${tar_url}" "${TMPDIR}/doctl.tar.gz"
|
||||||
download "${tar_url}" /tmp/doctl.tar.gz
|
|
||||||
mkdir -p "${DESTDIR}"
|
mkdir -p "${DESTDIR}"
|
||||||
tar -C "${DESTDIR}" -zxf /tmp/doctl.tar.gz "doctl"
|
tar -C "${DESTDIR}" -zxf "${TMPDIR}/doctl.tar.gz" "doctl"
|
||||||
add_bin_symlink doctl
|
add_bin_symlink doctl
|
||||||
;;
|
;;
|
||||||
rustup)
|
rustup)
|
||||||
|
|||||||
Reference in New Issue
Block a user