diff --git a/aptpkg b/aptpkg index 857b61c..6e3d37c 100755 --- a/aptpkg +++ b/aptpkg @@ -15,6 +15,7 @@ For more documentation, run man aptpkg Usage: aptpkg [directory] + aptpkg --all [directory] Build all folders under directory aptpkg --auto (commit id) Autobuild modified packages from commit aptpkg -h, --help Show help EOF @@ -148,10 +149,24 @@ change_autobuild_pkgs(){ done } +# Build all in directory +build_all_in_dir(){ + [ -d "$1" ] || error_usage_die "Provide a directory" + buildfile_folders=$(ls -d "$1"/*) + + for ww in $buildfile_folders; do + printf "\nBuilding %s\n\n" "$ww" + aptpkg "$ww" + done +} + # Run! case $1 in -h|--help) show_help ;; + --all) + shift + build_all_in_dir "$1" ;; --auto) shift change_autobuild_pkgs "$1" ;; diff --git a/docs/aptpkg.1.scd b/docs/aptpkg.1.scd index 35cddf8..b1a1f9b 100644 --- a/docs/aptpkg.1.scd +++ b/docs/aptpkg.1.scd @@ -8,6 +8,7 @@ aptpkg - easily create/ get debian packages *aptpkg* _path_ +*aptpkg* --all _path_ *aptpkg* --auto [git commit hash] *aptpkg* --help @@ -22,6 +23,9 @@ The --auto option can also be used to build modified packages based on a git commit hash, using _HEAD_ if one is not provided. The aptpkg script *must* be available in $PATH. +For mass rebuilds, aptpkg --auto can be used, passing a directory with folders +under which the build files are located. + # SEE ALSO *aptpkg*(5)