|
|
@@ -15,6 +15,7 @@ CURRENT_DIR = pathlib.Path(__file__).parent
|
|
|
|
|
|
def main():
|
|
|
bat()
|
|
|
+ choose()
|
|
|
curlie()
|
|
|
delta()
|
|
|
dua()
|
|
|
@@ -44,6 +45,26 @@ def bat():
|
|
|
|
|
|
subprocess.run(['sudo', 'apt', 'install', 'bat', '--yes'], check=True)
|
|
|
|
|
|
+def choose():
|
|
|
+ if platform.system() == 'Darwin':
|
|
|
+ print('$ brew install choose-rust')
|
|
|
+ subprocess.run(['brew', 'install', 'choose-rust'], check=True)
|
|
|
+ return
|
|
|
+ else:
|
|
|
+ assert platform.system() == 'Linux'
|
|
|
+
|
|
|
+ if (CURRENT_DIR / 'choose').exists():
|
|
|
+ print_gray('choose already downloaded')
|
|
|
+ return
|
|
|
+
|
|
|
+ client = httpx.Client()
|
|
|
+ arch = platform.machine()
|
|
|
+ if arch == 'arm64':
|
|
|
+ arch = 'aarch64'
|
|
|
+ url = f'https://github.com/theryangeary/choose/releases/latest/download/choose-{arch}-unknown-linux-gnu'
|
|
|
+ download(client, url, CURRENT_DIR / 'choose')
|
|
|
+ os.chmod(CURRENT_DIR / 'choose', 0o755)
|
|
|
+
|
|
|
def curlie():
|
|
|
if platform.system() == 'Darwin':
|
|
|
print('$ brew install curlie')
|