[Swift-commit] r3582 - trunk/libexec
noreply at svn.ci.uchicago.edu
noreply at svn.ci.uchicago.edu
Mon Aug 30 13:06:16 CDT 2010
Author: wozniak
Date: 2010-08-30 13:06:16 -0500 (Mon, 30 Aug 2010)
New Revision: 3582
Modified:
trunk/libexec/_swiftwrap
trunk/libexec/cdm_lib.sh
Log:
Make sure CDM does not do anything when not enabled
Modified: trunk/libexec/_swiftwrap
===================================================================
--- trunk/libexec/_swiftwrap 2010-08-30 17:18:21 UTC (rev 3581)
+++ trunk/libexec/_swiftwrap 2010-08-30 18:06:16 UTC (rev 3582)
@@ -367,23 +367,25 @@
fi
done
-logstate "LINK_CDM_OUTPUTS"
-SKIPPED_OUTPUT=()
-GATHER_OUTPUT=()
-for L in $OUTF ; do
- CDM_POLICY=$( cdm_lookup shared/cdm.pl $CDM_FILE $L )
- if [[ $CDM_POLICY != "DEFAULT" &&
- $CDM_POLICY != "BROADCAST"* ]]; then
- log "CDM_POLICY: $L -> $CDM_POLICY"
- eval cdm_action $DIR "OUTPUT" $L $CDM_POLICY
- SKIPPED_OUTPUT=( $SKIPPED_OUTPUT $L )
- fi
- if [ $CDM_POLICY == "GATHER" ]; then
- GATHER_OUTPUT=( $GATHER_OUTPUT $L )
- elif [ $CDM_POLICY == "LOCAL" ]; then
- CDM_LOCAL_OUTPUT=( $CDM_LOCAL_OUTPUT $L )
- fi
-done
+if [ ! -z $CDM_FILE ]; then
+ logstate "LINK_CDM_OUTPUTS"
+ SKIPPED_OUTPUT=()
+ GATHER_OUTPUT=()
+ for L in $OUTF ; do
+ CDM_POLICY=$( cdm_lookup shared/cdm.pl $CDM_FILE $L )
+ if [[ $CDM_POLICY != "DEFAULT" &&
+ $CDM_POLICY != "BROADCAST"* ]]; then
+ log "CDM_POLICY: $L -> $CDM_POLICY"
+ eval cdm_action $DIR "OUTPUT" $L $CDM_POLICY
+ SKIPPED_OUTPUT=( $SKIPPED_OUTPUT $L )
+ fi
+ if [ $CDM_POLICY == "GATHER" ]; then
+ GATHER_OUTPUT=( $GATHER_OUTPUT $L )
+ elif [ $CDM_POLICY == "LOCAL" ]; then
+ CDM_LOCAL_OUTPUT=( $CDM_LOCAL_OUTPUT $L )
+ fi
+ done
+fi
logstate "EXECUTE"
cd $DIR
@@ -490,5 +492,7 @@
# Local Variables:
# mode: sh
-# sh-basic-offset: 8
+# sh-basic-offset: 4
+# tab-width: 4
+# indent-tabs-mode: 1
# End:
Modified: trunk/libexec/cdm_lib.sh
===================================================================
--- trunk/libexec/cdm_lib.sh 2010-08-30 17:18:21 UTC (rev 3581)
+++ trunk/libexec/cdm_lib.sh 2010-08-30 18:06:16 UTC (rev 3582)
@@ -10,7 +10,7 @@
FILE=$3
RESULT="DEFAULT"
- if [ -f $CDM_PL ]; then
+ if [ ! -z $CDM_FILE ] && [ -f $CDM_PL ] && [ -f $CDM_FILE ]; then
RESULT=$( perl $CDM_PL lookup $FILE < $CDM_FILE 2> $INFO )
checkError 254 "cdm_lookup(): failed! (malformed CDM file?)"
fi
More information about the Swift-commit
mailing list