falconindy / pkgbuild-introspection

Tools for generating .SRCINFO files and PKGBUILD data extraction
MIT License
39 stars 9 forks source link

mkaurball: Support for passing -c to makepkg #4

Closed Earnestly closed 10 years ago

Earnestly commented 10 years ago

Which will clean up the src/ directory

diff --git a/mkaurball.in b/mkaurball.in
index 8c59b6c..1992501 100644
--- a/mkaurball.in
+++ b/mkaurball.in
@@ -23,6 +23,7 @@ usage() {
       'Usage: mkaurball [options]' \
       '' \
       '    -a <file>  package <file> as .AURINFO' \
+      '    -c         pass the -c flag to makepkg' \
       '    -e         edit .AURINFO before repackaging' \
       '    -f         pass the --force flag to makepkg' \
       '    -h         display this help message and exit'
@@ -73,11 +74,14 @@ mkaurball() {
   fi
 }

-while getopts ':a:efh' flag; do
+while getopts ':a:cefh' flag; do
   case $flag in
     a)
       srcinfo_path=$OPTARG
       ;;
+    c)
+      makepkg_args+=('-c')
+      ;;
     e)
       edit_srcinfo=1
       ;;
falconindy commented 10 years ago

I'm tempted to implement this a little differently -- automatically pass the flag if $PWD/src/ doesn't exist at the start of the script.

Earnestly commented 10 years ago

That sounds pretty reasonable actually.

falconindy commented 10 years ago

Implemented as 24a1651e7cc030a3b