Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-3764 tests: clean up sanity test_116a code style
[fs/lustre-release.git]
/
lustre
/
tests
/
maloo_upload.sh
diff --git
a/lustre/tests/maloo_upload.sh
b/lustre/tests/maloo_upload.sh
old mode 100644
(file)
new mode 100755
(executable)
index
dc81ed0
..
e16b45a
--- a/
lustre/tests/maloo_upload.sh
+++ b/
lustre/tests/maloo_upload.sh
@@
-1,31
+1,39
@@
#!/bin/sh
#!/bin/sh
+set -e
+
FILENAME=$1
if [ -r ~/.maloorc ] ; then
FILENAME=$1
if [ -r ~/.maloorc ] ; then
-
source ~/.maloorc
+ source ~/.maloorc
else
else
- echo "Error: ~/.maloorc not found. Please obtain this file from the maloo web interface, under 'Upload results'"
- exit 1
+ echo "Error: ~/.maloorc not found." \
+ "Please obtain this file from the maloo web interface," \
+ "under 'Upload results'"
+ exit 1
fi
if [ -z $FILENAME ] ; then
fi
if [ -z $FILENAME ] ; then
-
echo "Usage: ${0} <tarball or directory>"
-
exit 2
+ echo "Usage: ${0} <tarball or directory>"
+ exit 2
fi
fi
-
if [ ! -r $FILENAME ] ; then
if [ ! -r $FILENAME ] ; then
-
echo "Input file '$FILENAME' not found"
-
exit 3
+ echo "Input file '$FILENAME' not found"
+ exit 3
fi
echo Uploading $FILENAME to $MALOO_URL
if [ -d $FILENAME ] ; then
pushd $FILENAME
fi
echo Uploading $FILENAME to $MALOO_URL
if [ -d $FILENAME ] ; then
pushd $FILENAME
- tar czf - * | curl -F "user_id=${MALOO_USER_ID}" -F "upload=@-" -F "user_upload_token=${MALOO_UPLOAD_TOKEN}" ${MALOO_URL} > /dev/null
+ tar czf upload.tar.gz * |
+ curl -F "user_id=${MALOO_USER_ID}" -F "upload=@upload.tar.gz" \
+ -F "user_upload_token=${MALOO_UPLOAD_TOKEN}" ${MALOO_URL} \
+ > /dev/null
popd
else
popd
else
- curl -F "user_id=${MALOO_USER_ID}" -F "upload=@${FILENAME}" -F "user_upload_token=${MALOO_UPLOAD_TOKEN}" ${MALOO_URL} > /dev/null
+ curl -F "user_id=${MALOO_USER_ID}" -F "upload=@${FILENAME}" \
+ -F "user_upload_token=${MALOO_UPLOAD_TOKEN}" ${MALOO_URL} \
+ > /dev/null
fi
echo Complete.
fi
echo Complete.