File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
-
4
3
# # Get GOOS and GOARCH
5
4
case $( uname -m) in
6
5
i386) goarch=" 386" ;;
40
39
41
40
42
41
# Download and extract binary
43
- tar_gz_url=$( curl -s https://api.github.com/repos/jeadie/gram/releases/latest | jq -r " .assets[] | select(.name | test(\" gram-${goos} -${goarch} .tar.gz\" )) | .browser_download_url" | grep -v " md5" )
44
- wget -q $tar_gz_url -O gram.tar.gz > /dev/null
45
- tar -xf gram.tar.gz
46
- rm gram.tar.gz
42
+ binary_url=$( curl -s https://api.github.com/repos/jeadie/gram/releases/latest | jq -r " .assets[] | select(.name | test(\" gram-${goos} -${goarch} \" )) | .browser_download_url" | grep -v " md5" )
43
+ wget -q $binary_url -O gram > /dev/null
47
44
48
45
# Set gram command
49
46
chmod +x gram
50
47
51
48
# Set gram binary to path and alias
52
49
alias gram=" $( pwd) /gram"
53
- echo " export PATH=$PATH :$( pwd) /gram" > ~ /.bashrc
54
- echo " export PATH=$PATH :$( pwd) /gram" > ~ /.zshrc
50
+ echo " export PATH=\ $ PATH:$( pwd) /gram" > > ~ /.bashrc
51
+ echo " export PATH=\ $ PATH:$( pwd) /gram" > > ~ /.zshrc
55
52
56
53
You can’t perform that action at this time.
0 commit comments