Skip to content

Commit

Permalink
addition of install.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
jharshman committed May 17, 2023
1 parent 4e4f705 commit 2f609bc
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ associated with your Cloud Development VM.

## Installation

TODO how to install
Install by running the following in your terminal:
```bash
$ curl https://github.com/jharshman/fwsync/... | sh
$ curl https://raw.githubusercontent.com/jharshman/fwsync/master/install.sh | sh
```

## Usage
Expand Down
24 changes: 24 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/sh

VERSION="v0.0.1-1"
OS=$(uname -s | tr -d '\n')
ARCH=$(uname -m | tr -d '\n')
RELEASE=https://github.com/jharshman/fwsync/releases/download/${VERSION}/fwsync_${OS}_${ARCH}.tar.gz

# install
mkdir -p $HOME/.local/bin
wget $RELEASE
tar -zxvf -C $HOME/.local/bin/ fwsync_${OS}_${ARCH}
chmod +x $HOME/.local/bin/fwsync

# update PATH
echo "export PATH=$HOME/.local/bin:$PATH" >> $HOME/.bashrc

cat <<EOM
/////////////
// FWSYNC has been installed at $HOME/.local/bin/fwsync
//
// Your PATH has been updated in .bashrc.
// Restart your Terminal for the changes to take effect.
///////////////////////////////////////////////////////////
EOM

0 comments on commit 2f609bc

Please sign in to comment.