Skip to content
This repository has been archived by the owner on Jul 4, 2024. It is now read-only.

Commit

Permalink
Updated Makefile (un)install process
Browse files Browse the repository at this point in the history
  • Loading branch information
bytedream committed Sep 13, 2021
1 parent 606708b commit 3af31ca
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,23 @@ VERSION=1.1.0
BINARY_NAME=crunchy
VERSION_BINARY_NAME=$(BINARY_NAME)-v$(VERSION)

DESTDIR=
PREFIX=/usr

build:
cd cmd/crunchyroll-go && go build -o $(BINARY_NAME)
mv cmd/crunchyroll-go/$(BINARY_NAME) .

install:
cd cmd/crunchyroll-go && go build -o crunchyroll-go
mv cmd/crunchyroll-go/crunchyroll-go /usr/bin
ln -sf /usr/bin/crunchyroll-go /usr/bin/crunchy
cp crunchyroll-go.1 /usr/share/man/man1
install -Dm755 cmd/crunchyroll-go/crunchyroll-go $(DESTDIR)$(PREFIX)/bin/crunchyroll-go
install -Dm755 cmd/crunchyroll-go/crunchyroll-go $(DESTDIR)$(PREFIX)/bin/crunchy
install -Dm644 crunchyroll-go.1 $(DESTDIR)$(PREFIX)/share/man/man1/crunchyroll-go.1

uninstall:
unlink /usr/bin/crunchy
rm /usr/bin/crunchyroll-go
rm /usr/share/man/man1/crunchyroll-go.1
rm -f $(DESTDIR)$(PREFIX)/bin/crunchyroll-go
rm -f $(DESTDIR)$(PREFIX)/bin/crunchy
rm -f $(DESTDIR)$(PREFIX)/share/man/man1/crunchyroll-go.1

test:
go test -v .
Expand Down

0 comments on commit 3af31ca

Please sign in to comment.