Add a copy/ install wrapper (use in steps function)

main
earnest ma 2021-07-27 16:25:13 -04:00
parent b9ca592644
commit 8f0fb28cf7
No known key found for this signature in database
GPG Key ID: 6B361FA81C5FB695
1 changed files with 9 additions and 1 deletions

10
aptpkg
View File

@ -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 -