diff --git a/Makefile b/Makefile index f1916f4..14fce32 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/install.sh b/install.sh deleted file mode 100644 index cd11f0f..0000000 --- a/install.sh +++ /dev/null @@ -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"