Compare commits
No commits in common. "76774e7116e0ec2022b6fd2cc2feb7f44827b20e" and "b2a8a747cffabd38317c1f5e51a9ab5d9ee1f6cf" have entirely different histories.
76774e7116
...
b2a8a747cf
@ -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" && $(uname -m) != "aarch64" ]]; then
|
elif [[ $(uname -m) != "x86_64" ]]; 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_$(uname -m)-unknown-linux-musl.zip -d $tempdir/eza
|
unzip $scriptdir/files/eza_x86_64-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
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"registry-mirrors": [
|
"registry-mirrors": [
|
||||||
"https://d.nano.ac",
|
"https://registry.cn-beijing.aliyuncs.com",
|
||||||
"https://docker-registry.infra.i2sec.cc:50001"
|
"https://mirror.ccs.tencentyun.com"
|
||||||
],
|
],
|
||||||
"insecure-registries": [
|
"insecure-registries": [
|
||||||
"localhost:5000"
|
"localhost:5000"
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@ -1,37 +0,0 @@
|
|||||||
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