From 8f0fb28cf7dccd017a73efaf0eea87f6bb2a3bf8 Mon Sep 17 00:00:00 2001 From: earnest ma Date: Tue, 27 Jul 2021 16:25:13 -0400 Subject: [PATCH] Add a copy/ install wrapper (use in steps function) --- aptpkg | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/aptpkg b/aptpkg index 5549519..1cef6a7 100755 --- a/aptpkg +++ b/aptpkg @@ -27,6 +27,14 @@ error_usage_die(){ exit 1 } +# Copy/ install wrapper for files +cin-bin(){ + install -Dm755 "$@" +} +cin-file(){ + install -Dm644 "$@" +} + # Check that "build" file exists in directory check(){ if ! [ -f "$1/build" ]; then @@ -67,7 +75,7 @@ build_file(){ gen_control_file "$@" for maintfile in preinst postinst prerm postrm; do - [ -f $maintfile ] && cp $maintfile "$builddir"/debian/ + [ -f $maintfile ] && cin-bin $maintfile "$builddir"/debian/ done cd -