Skip to content

Commit

Permalink
added script
Browse files Browse the repository at this point in the history
Signed-off-by: bishal7679 <bishalhnj127@gmail.com>
  • Loading branch information
bishal7679 committed May 13, 2023
1 parent d5105f1 commit f83af30
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
GOOS_LINUX = linux
GOOS_WINDOWS = windows
GOOS_MACOS = darwin

GOARCH_LINUX = amd64
GOARCH_WINDOWS = amd64
GOARCH_MACOS = arm64


install_linux:
env GOOS=${GOOS_LINUX} GOARCH=${GOARCH_LINUX} ./builder.sh

install_macos:
env GOOS=${GOOS_MACOS} GOARCH=${GOARCH_MACOS} ./builder.sh

install_macos_intel:
env GOOS=${GOOS_MACOS} GOARCH=${GOARCH_MACOS_INTEL} ./builder.sh

uninstall:
./uninstall.sh
9 changes: 2 additions & 7 deletions install.sh → builder.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
git clone https://github.com/bishal7679/ksapify.git
cd ksapify/cli || echo -e "\033[31;40mPath couldn't be found\033[0m\n"

cd ./cli || echo -e "\033[31;40mPath couldn't be found\033[0m\n"

# go building ...
go get -d
Expand All @@ -10,12 +10,7 @@ chmod +x ksapify
# moving binary to local/bin to make it executable
sudo mv -v ksapify /usr/local/bin/ksapify

cd ..
cd ..
sudo rm -fr ksapify


echo -e "\033[32;40mINSTALLATION COMPLETED!\033[0m\n"


cd - || echo -e "\033[31;40mFailed to move to previous directory\033[0m\n"

0 comments on commit f83af30

Please sign in to comment.