From ee2ca5c632e7e1bb8925fa3ec3902f44f47c3589 Mon Sep 17 00:00:00 2001 From: udeved Date: Sat, 4 Oct 2014 21:50:00 +0200 Subject: [PATCH] integrate IV --- Makefile | 10 ++-------- bin/{signpkg => signpkg.in} | 35 +++++++++++++++++++---------------- lib/functions.sh | 16 ++++++++++++++++ 3 files changed, 37 insertions(+), 24 deletions(-) rename bin/{signpkg => signpkg.in} (56%) mode change 100755 => 100644 diff --git a/Makefile b/Makefile index 34b5718..aca5362 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,8 @@ BINPROGS = \ bin/build-set-helper \ bin/basestrap \ bin/manjaro-chroot \ - bin/fstabgen + bin/fstabgen \ + bin/signpkg SYSCONFIGFILES = \ conf/manjaro-tools.conf @@ -43,13 +44,6 @@ edit = sed -e "s|@pkgdatadir[@]|$(DESTDIR)$(PREFIX)/share/manjaro-tools|g" \ -e "s|@sysconfdir[@]|$(DESTDIR)$(SYSCONFDIR)/manjaro-tools|g" \ -e "s|@libdir[@]|$(DESTDIR)$(PREFIX)/lib/manjaro-tools|g" -# %: bin/%.in Makefile lib/common.sh -# @echo "GEN $@" -# @$(RM) "$@" -# @m4 -P $@.in | $(edit) >$@ -# @chmod a-w "$@" -# @chmod +x "$@" - %: %.in Makefile @echo "GEN $@" @$(RM) "$@" diff --git a/bin/signpkg b/bin/signpkg.in old mode 100755 new mode 100644 similarity index 56% rename from bin/signpkg rename to bin/signpkg.in index b1ae84d..9817547 --- a/bin/signpkg +++ b/bin/signpkg.in @@ -9,27 +9,30 @@ # GNU General Public License for more details. -err() { - ALL_OFF="\e[1;0m" - BOLD="\e[1;1m" - RED="${BOLD}\e[1;31m" - local mesg=$1; shift - printf "${RED}==>${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2 -} - -msg() { - ALL_OFF="\e[1;0m" - BOLD="\e[1;1m" - GREEN="${BOLD}\e[1;32m" - local mesg=$1; shift - printf "${GREEN}==>${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2 -} +# err() { +# ALL_OFF="\e[1;0m" +# BOLD="\e[1;1m" +# RED="${BOLD}\e[1;31m" +# local mesg=$1; shift +# printf "${RED}==>${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2 +# } +# +# msg() { +# ALL_OFF="\e[1;0m" +# BOLD="\e[1;1m" +# GREEN="${BOLD}\e[1;32m" +# local mesg=$1; shift +# printf "${GREEN}==>${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2 +# } +if [[ -r @libdir@/functions.sh ]];then + source @libdir@/functions.sh +fi . /etc/makepkg.conf if [ ! -e "$1" ]; then - err "Package '$1' does not exists!" + error "Package '$1' does not exists!" exit 1 fi diff --git a/lib/functions.sh b/lib/functions.sh index c878fb6..3f7df5e 100644 --- a/lib/functions.sh +++ b/lib/functions.sh @@ -16,6 +16,22 @@ export LANG=C # msg2() { out " ->" "$@";} # die() { error "$@"; exit 1; } +# err() { +# ALL_OFF="\e[1;0m" +# BOLD="\e[1;1m" +# RED="${BOLD}\e[1;31m" +# local mesg=$1; shift +# printf "${RED}==>${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2 +# } +# +# msg() { +# ALL_OFF="\e[1;0m" +# BOLD="\e[1;1m" +# GREEN="${BOLD}\e[1;32m" +# local mesg=$1; shift +# printf "${GREEN}==>${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2 +# } + ###############################################messages########################################################## # check if messages are to be printed using color