mirror of
https://github.com/armbian/build.git
synced 2025-08-11 21:56:58 +02:00
- move `fakeroot_dpkg_deb_build()` from runners.sh to new utils-dpkgdeb.sh - and make it debug show the size of the source - clean off `.git` directory earlier for full build - @TODO: get rid of the "hardlinks" funky biz in there and not-copy `.git` to begin with
23 lines
680 B
Bash
23 lines
680 B
Bash
# for deb building.
|
|
function fakeroot_dpkg_deb_build() {
|
|
display_alert "Building .deb package" "$*" "debug"
|
|
|
|
declare -a orig_args=("$@")
|
|
# find the first non-option argument
|
|
declare first_arg
|
|
for first_arg in "${orig_args[@]}"; do
|
|
if [[ "${first_arg}" != -* ]]; then
|
|
break
|
|
fi
|
|
done
|
|
|
|
if [[ ! -d "${first_arg}" ]]; then
|
|
exit_with_error "fakeroot_dpkg_deb_build: can't find source package directory: ${first_arg}"
|
|
fi
|
|
|
|
# Show the total human size of the source package directory.
|
|
display_alert "Source package size" "${first_arg}: $(du -sh "${first_arg}" | cut -f1)" "debug"
|
|
|
|
run_host_command_logged_raw fakeroot dpkg-deb -b "-Z${DEB_COMPRESS}" "${orig_args[@]}"
|
|
}
|