Skip to content

Commit

Permalink
change installation method
Browse files Browse the repository at this point in the history
  • Loading branch information
bilgehannal committed Jan 22, 2023
1 parent d22e116 commit 74dc161
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 21 deletions.
41 changes: 24 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,39 +20,46 @@ fcode makes, sending your files anywhere so fast with your command line interfac


### Installation
#### MacOS
**Installing with HomeBrew**

MacOSX
```
brew tap bilgehannal/bilgehan
brew install fcode
```

**Installing with wget**

Requirements:
* wget must be installed.

Run the command below:

MacOSX (Intel)
```
wget -q -O - https://raw.githubusercontent.com/bilgehannal/foldercode-cli/main/install.sh | bash -s macosx
wget -q -O - https://raw.githubusercontent.com/bilgehannal/foldercode-cli/main/install.sh | bash -s 0.1.0 darwin amd64
```
**Manual Installing**
* Go to [releases page](https://github.com/bilgehannal/foldercode-cli/releases)
* Download `fcode.macosx` (executable file)
* Change name to `fcode`
* Move `fcode` to `/usr/local/bin`
* Give executable permissions with `chmod +x /usr/local/bin/fcode`

MacOSX (Apple Sillicon)
```
wget -q -O - https://raw.githubusercontent.com/bilgehannal/foldercode-cli/main/install.sh | bash -s 0.1.0 darwin arm64
```

#### Linux
**Installing with wget**
Linux (amd64)
```
wget -q -O - https://raw.githubusercontent.com/bilgehannal/foldercode-cli/main/install.sh | bash -s 0.1.0 linux amd64
```

Requirements:
* wget must be installed.
Run the command below:
Linux (arm64)
```
wget -q -O - https://raw.githubusercontent.com/bilgehannal/foldercode-cli/main/install.sh | bash -s linux
wget -q -O - https://raw.githubusercontent.com/bilgehannal/foldercode-cli/main/install.sh | bash -s 0.1.0 linux arm64
```
**Manual Installing**
* Go to [releases page](https://github.com/bilgehannal/foldercode-cli/releases)
* Download `fcode.linux` (executable file)
* Change name to `fcode`
* Download tar file according to your os (`linux` or `darwin`(`macosx`)) and hardware architacture(`amd64` or `arm64`)
* Extract the tar file
* Move `fcode` to `/usr/local/bin`
* Give executable permissions with `chmod +x /usr/local/bin/fcode`

---
[![macOS](https://svgshare.com/i/ZjP.svg)](https://svgshare.com/i/ZjP.svg) [![Linux](https://svgshare.com/i/Zhy.svg)](https://svgshare.com/i/Zhy.svg)
[![made-with-Go](https://img.shields.io/badge/Made%20with-Go-1f425f.svg)](https://go.dev/)
17 changes: 13 additions & 4 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
echo 'Downloading fcode executable file...'
sudo wget "https://github.com/bilgehannal/foldercode-cli/releases/download/v0.0.1/fcode.${1}" -O /usr/local/bin/fcode
echo 'Checking permissions...'
sudo chmod +x /usr/local/bin/fcode
echo 'Downloading and installing fcode executable file...'

BASE_RELEASES_URL="https://github.com/bilgehannal/foldercode-cli/releases/download"
VERSION="$1"
DISTRO="$2"
ARCH="$3"
TAR_NAME="foldercode-cli_${VERSION}_${DISTRO}_${ARCH}.tar.gz"
wget "$BASE_RELEASES_URL/v${VERSION}/${TAR_NAME}"
tar -xzvf $TAR_NAME fcode
chmod +x fcode
sudo mv fcode /usr/local/bin/fcode
rm $TAR_NAME

echo 'fcode is installed.'
echo 'Run: fcode --help'

0 comments on commit 74dc161

Please sign in to comment.