From 9472966b92a28c69e185ed136fd5946155eb26f1 Mon Sep 17 00:00:00 2001 From: Leonid Pliushch Date: Thu, 19 Nov 2020 15:28:15 +0200 Subject: [PATCH] rewrite makefile --- Makefile | 10 +++++++++- install.sh | 7 ------- 2 files changed, 9 insertions(+), 8 deletions(-) delete mode 100644 install.sh 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"