eza now support aarch64!
This commit is contained in:
parent
ebce2cf669
commit
76774e7116
@ -82,10 +82,10 @@ configure_install_new() {
|
|||||||
configure_install_eza() {
|
configure_install_eza() {
|
||||||
if [ "$(uname)" = "Darwin" ]; then
|
if [ "$(uname)" = "Darwin" ]; then
|
||||||
brew install eza
|
brew install eza
|
||||||
elif [[ $(uname -m) != "x86_64" ]]; then
|
elif [[ $(uname -m) != "x86_64" && $(uname -m) != "aarch64" ]]; then
|
||||||
echo "eza is not supported on $(uname -m)."
|
echo "eza is not supported on $(uname -m)."
|
||||||
elif ! command_exists eza; then
|
elif ! command_exists eza; then
|
||||||
unzip $scriptdir/files/eza_x86_64-unknown-linux-musl.zip -d $tempdir/eza
|
unzip $scriptdir/files/eza_$(uname -m)-unknown-linux-musl.zip -d $tempdir/eza
|
||||||
sudo cp $tempdir/eza/eza /usr/local/bin/
|
sudo cp $tempdir/eza/eza /usr/local/bin/
|
||||||
rm $tempdir/eza -r
|
rm $tempdir/eza -r
|
||||||
fi
|
fi
|
||||||
|
|||||||
BIN
files/eza_aarch64-unknown-linux-gnu.zip
Normal file
BIN
files/eza_aarch64-unknown-linux-gnu.zip
Normal file
Binary file not shown.
Binary file not shown.
37
update_file.py
Normal file
37
update_file.py
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
import requests
|
||||||
|
|
||||||
|
|
||||||
|
def eza_get_latest_version():
|
||||||
|
url = "https://api.github.com/repos/eza-community/eza/releases/latest"
|
||||||
|
response = requests.get(url)
|
||||||
|
if response.status_code == 200:
|
||||||
|
latest_release = response.json()
|
||||||
|
return latest_release['tag_name'].lstrip('v')
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
def eza_download_latest_version(version):
|
||||||
|
download_url = f"https://github.com/eza-community/eza/releases/download/v{version}/eza_x86_64-unknown-linux-musl.zip"
|
||||||
|
response = requests.get(download_url)
|
||||||
|
if response.status_code == 200:
|
||||||
|
with open(f"files/eza_x86_64-unknown-linux-musl.zip", "wb") as file:
|
||||||
|
file.write(response.content)
|
||||||
|
print(f"Downloaded eza version {version} (x86_64) successfully.")
|
||||||
|
else:
|
||||||
|
print(f"Failed to download eza version {version}.")
|
||||||
|
download_url = f"https://github.com/eza-community/eza/releases/download/v{version}/eza_aarch64-unknown-linux-gnu.zip"
|
||||||
|
response = requests.get(download_url)
|
||||||
|
if response.status_code == 200:
|
||||||
|
with open(f"files/eza_aarch64-unknown-linux-gnu.zip", "wb") as file:
|
||||||
|
file.write(response.content)
|
||||||
|
print(f"Downloaded eza version {version} (x86_64) successfully.")
|
||||||
|
else:
|
||||||
|
print(f"Failed to download eza version {version}.")
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
latest_version = eza_get_latest_version()
|
||||||
|
if (latest_version):
|
||||||
|
eza_download_latest_version(latest_version)
|
||||||
|
else:
|
||||||
|
print("Failed to get the latest eza version.")
|
||||||
Loading…
Reference in New Issue
Block a user