Compare commits

...

3 Commits

Author SHA1 Message Date
PorridgePi
a90c3b4ace bootstrap: lsd: fix: Change ARCH from aarch64 to arm64 2022-09-28 20:00:59 +08:00
PorridgePi
0eaf934c15 bootstrap: lsd: fix: Add missing dollar sign 2022-09-28 20:00:22 +08:00
PorridgePi
be0ecb3305 zshrc: feat: Add ARCH variable 2022-09-28 19:57:26 +08:00
2 changed files with 8 additions and 3 deletions

View File

@@ -3,9 +3,12 @@ if ! command -v lsd &> /dev/null; then
if [[ "$OSNAME" == "Linux" ]]; then if [[ "$OSNAME" == "Linux" ]]; then
# Linux # Linux
if [[ "DISTRO_TYPE" == "debian" ]]; then if [[ "$DISTRO_TYPE" == "debian" ]]; then
# Debian-based # Debian-based
URL=$(curl -s https://api.github.com/repos/Peltoche/lsd/releases/latest | grep browser_download_url | cut -d '"' -f 4 | grep $(uname -m) | grep -v musl) if [[ "$ARCH" == "aarch64" ]]; then
ARCH=arm64
fi
URL=$(curl -s https://api.github.com/repos/Peltoche/lsd/releases/latest | grep browser_download_url | cut -d '"' -f 4 | grep $ARCH | grep -v musl)
curl -o /temp/lsd.deb "$URL" curl -o /temp/lsd.deb "$URL"
sudo dpkg -i /temp/lsd.deb sudo dpkg -i /temp/lsd.deb
else else

4
.zshrc
View File

@@ -52,7 +52,9 @@ else
VER=$(uname -r) VER=$(uname -r)
fi fi
export OSNAME DISTRO DISTRO_TYPE VER ARCH=$(uname -m)
export OSNAME DISTRO DISTRO_TYPE VER ARCH
########## Zinit ############################################################## ########## Zinit ##############################################################