Skip to content

Commit

Permalink
Add option to clean build products
Browse files Browse the repository at this point in the history
  • Loading branch information
defagos committed Mar 13, 2014
1 parent aaa2862 commit 3b16196
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion make-fmwk.sh
Expand Up @@ -24,6 +24,7 @@ param_output_dir=""
param_project_name=""
param_public_headers_file=""
param_sdk_version=""
param_cleanup_build_products=false
param_target_name=""

log_dir=""
Expand Down Expand Up @@ -98,6 +99,7 @@ usage() {
echo " -k: By default the compilation is made against the most"
echo " recent version of the iOS SDK. Use this option to"
echo " use a specific version number, e.g. 4.0"
echo " -K: Cleanup build products if successful"
echo " -l: Output directory for log files (build directory"
echo " if omitted)"
echo " -L: Lock the .staticframework output files to prevent from"
Expand Down Expand Up @@ -142,7 +144,7 @@ check_prefix() {
}

# Processing command-line parameters
while getopts b:f:hk:l:Lno:p:st:u:v OPT; do
while getopts b:f:hk:Kl:Lno:p:st:u:v OPT; do
case "$OPT" in
b)
param_bootstrap_file="$OPTARG"
Expand All @@ -157,6 +159,9 @@ while getopts b:f:hk:l:Lno:p:st:u:v OPT; do
k)
param_sdk_version="$OPTARG"
;;
K)
param_cleanup_build_products=true
;;
l)
param_log_dir="$OPTARG"
;;
Expand Down Expand Up @@ -686,5 +691,11 @@ if $param_lock_output; then
find "$output_dir" -path "*/$framework_full_name.staticframework/*" -exec chmod a-w {} \;
fi

# Cleanup build products
if $param_cleanup_build_products; then
echo "Cleanup build files..."
rm -rf "$BUILD_DIR"
fi

# Done
echo "Done creating $framework_full_name.staticframework"

0 comments on commit 3b16196

Please sign in to comment.