xtendo-org / chips

A fast, lightweight, and concurrent plugin manager for the fish shell, written in Haskell
73 stars 3 forks source link

Update installation script in README #10

Closed simnalamburt closed 8 years ago

simnalamburt commented 8 years ago

Before

curl -L \
    https://github.com/kinoru/chips/releases/download/1.0.0/chips_linux_x64 \
    > ~/.local/bin/chips \
    ; and chmod +x ~/.local/bin/chips

After

curl -Lo ~/.local/bin/chips --create-dirs \
    https://github.com/kinoru/chips/releases/download/1.0.0/chips_linux_x64 \
    ; and chmod +x ~/.local/bin/chips


Explained

1. -o

If ~/.local/bin/chips doesn't exist, it makes an error below:

An error occurred while redirecting file '/Users/<username>/.local/bin/chips'
open: No such file or directory
2. --create-dirs

If ~/.local/bin directory doesn't exist, it makes an error below:

Warning: Failed to create the file /Users/<username>/.local/bin/chips: No
Warning: such file or directory
curl: (23) Failed writing body (0 != 16384)