rewrite makefile

This commit is contained in:
Leonid Pliushch 2020-11-19 15:28:15 +02:00
parent c54e499fc1
commit 9472966b92
No known key found for this signature in database
GPG Key ID: 45F2964132545795
2 changed files with 9 additions and 8 deletions

View File

@ -1,3 +1,11 @@
PREFIX := /data/data/com.termux/files/usr
BIN = whatprovides
DB_PATH = $(PREFIX)/share/whatprovides/db
DB_FILES = $(wildcard db/*)
.PHONY: install
install:
bash install.sh
install -Dm700 -t $(PREFIX)/bin $(BIN)
for i in $(DB_FILES); do \
install -Dm600 $$i $(DB_PATH)/$$(basename $$i); \
done

View File

@ -1,7 +0,0 @@
#!/bin/bash
NAME="whatprovides"
mkdir -p $PREFIX/share/${NAME}
cp -r db $PREFIX/share/${NAME}
cp ${NAME} $PREFIX/bin
echo "Installation finished. execute $NAME -h for help"