Skip to content

Commit

Permalink
docs: update docs for installation instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
sumanchapai committed Mar 22, 2024
1 parent 307a35f commit f576280
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
# ad2bs date conversion

Convert a given AD date in the format YYYY-MM-DD to BS date in the same format.

To convert your birthday on 1999-10-29 AD to nepali, run\
`ad2bs 1999-10-29`

## Installing / Updating `ad2bs`

### For macOS/Linux

```sh
rm -f `which ad2bs`
curl -s https://raw.githubusercontent.com/opensource-nepal/ad2bs/main/scripts/install.txt | sh
```

### For Windows

Have go >= 1.21 installed. Clone the repo, then run `go install .`
2 changes: 1 addition & 1 deletion scripts/install.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ add_usr_local_bin_to_path() {
install_in_usr_local() {
mkdir -p ~/.local
cd ~/.local
curl -s https://github.com/opensource-nepal/ad2bs/blob/main/scripts/install_main.txt | sh
curl -s https://raw.githubusercontent.com/opensource-nepal/ad2bs/main/scripts/install_main.txt | sh
# If command ad2bs is not found add user .local/bin to path
command -v ad2bs || add_usr_local_bin_to_path
cd -
Expand Down
2 changes: 1 addition & 1 deletion scripts/install_main.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e
usage() {
this=$1
cat <<EOF
$this: download go binaries for sumanchapi/ad2bs
$this: download go binaries for opensource-nepal/ad2bs
Usage: $this [-b] bindir [-d] [tag]
-b sets bindir or installation directory, Defaults to ./bin
Expand Down

0 comments on commit f576280

Please # to comment.