create_tarball: cleanup whitespace errors
No code / logic changes.
Этот коммит содержится в:
родитель
219581e87e
Коммит
acf94eef7e
62
contrib/nightly/create_tarball.sh
Исполняемый файл → Обычный файл
62
contrib/nightly/create_tarball.sh
Исполняемый файл → Обычный файл
@ -10,7 +10,7 @@
|
|||||||
# University of Stuttgart. All rights reserved.
|
# University of Stuttgart. All rights reserved.
|
||||||
# Copyright (c) 2004-2005 The Regents of the University of California.
|
# Copyright (c) 2004-2005 The Regents of the University of California.
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
# Copyright (c) 2006-2014 Cisco Systems, Inc. All rights reserved.
|
# Copyright (c) 2006-2015 Cisco Systems, Inc. All rights reserved.
|
||||||
# $COPYRIGHT$
|
# $COPYRIGHT$
|
||||||
#
|
#
|
||||||
# Additional copyrights may follow
|
# Additional copyrights may follow
|
||||||
@ -70,13 +70,13 @@ send_error_mail() {
|
|||||||
rm -f "$outfile"
|
rm -f "$outfile"
|
||||||
touch "$outfile"
|
touch "$outfile"
|
||||||
for file in `/bin/ls $logdir/* | sort`; do
|
for file in `/bin/ls $logdir/* | sort`; do
|
||||||
len="`wc -l $file | awk '{ print $1}'`"
|
len="`wc -l $file | awk '{ print $1}'`"
|
||||||
if test "`expr $len \> $max_log_len`" = "1"; then
|
if test "`expr $len \> $max_log_len`" = "1"; then
|
||||||
echo "[... previous lines snipped ...]" >> "$outfile"
|
echo "[... previous lines snipped ...]" >> "$outfile"
|
||||||
tail -n $max_log_len "$file" >> "$outfile"
|
tail -n $max_log_len "$file" >> "$outfile"
|
||||||
else
|
else
|
||||||
cat "$file" >> "$outfile"
|
cat "$file" >> "$outfile"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
Mail -s "=== CREATE FAILURE ($version) ===" "$email" < "$outfile"
|
Mail -s "=== CREATE FAILURE ($version) ===" "$email" < "$outfile"
|
||||||
rm -f "$outfile"
|
rm -f "$outfile"
|
||||||
@ -101,16 +101,16 @@ do_command() {
|
|||||||
logfile="$logdir/20-command.txt"
|
logfile="$logdir/20-command.txt"
|
||||||
rm -f "$logfile"
|
rm -f "$logfile"
|
||||||
if test -n "$debug"; then
|
if test -n "$debug"; then
|
||||||
echo "*** Running command: $cmd"
|
echo "*** Running command: $cmd"
|
||||||
eval $cmd > "$logfile" 2>&1
|
eval $cmd > "$logfile" 2>&1
|
||||||
st=$?
|
st=$?
|
||||||
echo "*** Command complete: exit status: $st"
|
echo "*** Command complete: exit status: $st"
|
||||||
else
|
else
|
||||||
eval $cmd > "$logfile" 2>&1
|
eval $cmd > "$logfile" 2>&1
|
||||||
st=$?
|
st=$?
|
||||||
fi
|
fi
|
||||||
if test "$st" != "0"; then
|
if test "$st" != "0"; then
|
||||||
cat > "$logdir/15-error.txt" <<EOF
|
cat > "$logdir/15-error.txt" <<EOF
|
||||||
|
|
||||||
ERROR: Command returned a non-zero exist status ($version):
|
ERROR: Command returned a non-zero exist status ($version):
|
||||||
$cmd
|
$cmd
|
||||||
@ -120,14 +120,14 @@ End time: `date`
|
|||||||
|
|
||||||
=======================================================================
|
=======================================================================
|
||||||
EOF
|
EOF
|
||||||
cat > "$logdir/25-error.txt" <<EOF
|
cat > "$logdir/25-error.txt" <<EOF
|
||||||
=======================================================================
|
=======================================================================
|
||||||
|
|
||||||
Your friendly daemon,
|
Your friendly daemon,
|
||||||
Cyrador
|
Cyrador
|
||||||
EOF
|
EOF
|
||||||
send_error_mail
|
send_error_mail
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
rm -f "$logfile"
|
rm -f "$logfile"
|
||||||
}
|
}
|
||||||
@ -187,21 +187,21 @@ version=$describe
|
|||||||
if test -f "$destdir/latest_snapshot.txt"; then
|
if test -f "$destdir/latest_snapshot.txt"; then
|
||||||
snapshot_describe=`cat $destdir/latest_snapshot.txt`
|
snapshot_describe=`cat $destdir/latest_snapshot.txt`
|
||||||
if test -n "$debug"; then
|
if test -n "$debug"; then
|
||||||
echo "** last snapshot describe: $snapshot_describe"
|
echo "** last snapshot describe: $snapshot_describe"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Do we need a new snapshot?
|
# Do we need a new snapshot?
|
||||||
if test "$describe" = "$snapshot_describe"; then
|
if test "$describe" = "$snapshot_describe"; then
|
||||||
if test -n "$debug"; then
|
if test -n "$debug"; then
|
||||||
echo "** git $gitbranch describe is same as latest_snapshot -- not doing anything"
|
echo "** git $gitbranch describe is same as latest_snapshot -- not doing anything"
|
||||||
fi
|
fi
|
||||||
# Since we didn't do anything, there's no point in leaving the clone we
|
# Since we didn't do anything, there's no point in leaving the clone we
|
||||||
# just created
|
# just created
|
||||||
cd ..
|
cd ..
|
||||||
rm -rf $clone_root
|
rm -rf $clone_root
|
||||||
|
|
||||||
# All done... nothing to see here...
|
# All done... nothing to see here...
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -273,9 +273,9 @@ echo $version > latest_snapshot.txt
|
|||||||
for ext in gz bz2; do
|
for ext in gz bz2; do
|
||||||
count="`ls openmpi*.tar.$ext | wc -l | awk '{ print $1 }'`"
|
count="`ls openmpi*.tar.$ext | wc -l | awk '{ print $1 }'`"
|
||||||
if test "`expr $count \> $max_snapshots`" = "1"; then
|
if test "`expr $count \> $max_snapshots`" = "1"; then
|
||||||
num_old="`expr $count - $max_snapshots`"
|
num_old="`expr $count - $max_snapshots`"
|
||||||
old="`ls -rt openmpi*.tar.$ext | head -n $num_old`"
|
old="`ls -rt openmpi*.tar.$ext | head -n $num_old`"
|
||||||
rm -f $old
|
rm -f $old
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user