X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fclam%2Fcpp%2Fms_manifest.sh;h=94f0f66961f494266861762d8c2d14be0acebc03;hb=7c7d191539d4e5a94c4b39433e32b05deab44f24;hp=a752837cc893309fbb4aa382ce4bfadcb6ec4ab0;hpb=46198a8a6081484e0e452a3a47c8bec10f254487;p=feisty_meow.git diff --git a/scripts/clam/cpp/ms_manifest.sh b/scripts/clam/cpp/ms_manifest.sh old mode 100755 new mode 100644 index a752837c..94f0f669 --- a/scripts/clam/cpp/ms_manifest.sh +++ b/scripts/clam/cpp/ms_manifest.sh @@ -1,25 +1,33 @@ #!/bin/bash -# the basename is the file that needs its manifest stuffed into the file +# the target is the file that needs its manifest stuffed into the file # itself. the where parameter tells us what index to use when stuffing it. -basename=$1 -where=$2 +target=$1; shift +where=$1; shift if [ -z "$WIN32_MANIFEST_FILE" ]; then - WIN32_MANIFEST_FILE=$CLAM_DIR/cpp/ms_manifests/security_manifest.txt -fi -error_val=0 -if [ -f "$basename.manifest" -a -f "$basename" ]; then - bash $BUILD_SCRIPTS_DIR/wrapdoze.sh mt -manifest $basename.manifest $WIN32_MANIFEST_FILE -outputresource:$basename\;$where >/dev/null - error_val=$? -elif [ -f "$basename" ]; then - bash $BUILD_SCRIPTS_DIR/wrapdoze.sh mt -manifest $WIN32_MANIFEST_FILE -outputresource:$basename\;$where >/dev/null - error_val=$? -else - echo skipping manifest generation for $basename. - if [ ! -f "$basename.manifest" ]; then echo manifest file was missing.; fi - if [ ! -f "$basename" ]; then echo main file was missing.; fi + WIN32_MANIFEST_FILE=$CLAM_SCRIPTS/cpp/ms_manifests/security_manifest.txt fi +for ((count=1 ; count <= 10; count++)); do + error_val=0 + if [ -f "$target.manifest" -a -f "$target" ]; then + bash $BUILD_SCRIPTS_PATH/wrapdoze.sh mt -manifest $target.manifest $WIN32_MANIFEST_FILE -outputresource:$target\;$where >/dev/null + error_val=$? + elif [ -f "$target" ]; then + bash $BUILD_SCRIPTS_PATH/wrapdoze.sh mt -manifest $WIN32_MANIFEST_FILE -outputresource:$target\;$where >/dev/null + error_val=$? + else + echo skipping manifest generation for $target. + if [ ! -f "$target.manifest" ]; then echo manifest file was missing.; fi + if [ ! -f "$target" ]; then echo main file was missing.; fi + break + fi + if [ $error_val -ne 0 ]; then + echo "Error attaching manifest to $target at try #$count." + else + break + fi +done if [ $error_val -ne 0 ]; then - echo There was an error attaching manifest to $1. + echo There was an error attaching manifest to $target. exit 12 fi