Add 'deps/cmph/' from commit 'a250982ade093f4eed0552bbdd22dd7b0432007f'
git-subtree-dir: deps/cmph git-subtree-mainline:5040f4007bgit-subtree-split:a250982ade
This commit is contained in:
49
deps/cmph/scpscript
vendored
Executable file
49
deps/cmph/scpscript
vendored
Executable file
@@ -0,0 +1,49 @@
|
||||
#!/bin/bash
|
||||
|
||||
upload_opt=
|
||||
|
||||
while getopts "u:" opt; do
|
||||
case $opt in
|
||||
u)
|
||||
upload_opt="$OPTARG"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
function usage {
|
||||
echo "Usage: $0 -u <upload_opt>"
|
||||
echo "-u <upload_opt> What to upload. It can be either of the following options:"
|
||||
echo " * html"
|
||||
echo " * examples"
|
||||
echo " * papers"
|
||||
echo " * all"
|
||||
exit 1
|
||||
}
|
||||
|
||||
if [ "$upload_opt" = "" ]
|
||||
then
|
||||
usage
|
||||
fi
|
||||
|
||||
if [ "$upload_opt" != "html" ] &&
|
||||
[ "$upload_opt" != "examples" ] &&
|
||||
[ "$upload_opt" != "papers" ] &&
|
||||
[ "$upload_opt" != "all" ]
|
||||
then
|
||||
usage
|
||||
fi
|
||||
|
||||
if [ "$upload_opt" = "html" ] || [ "$upload_opt" = "all" ]
|
||||
then
|
||||
scp -r *.html fc_botelho@web.sourceforge.net:/home/project-web/cmph/htdocs/
|
||||
fi
|
||||
|
||||
if [ "$upload_opt" = "examples" ] || [ "$upload_opt" = "all" ]
|
||||
then
|
||||
scp -r examples/*.c examples/keys.txt fc_botelho@web.sourceforge.net:/home/project-web/cmph/htdocs/examples/
|
||||
fi
|
||||
|
||||
if [ "$upload_opt" = "papers" ] || [ "$upload_opt" = "all" ]
|
||||
then
|
||||
scp -r papers/*.pdf fc_botelho@web.sourceforge.net:/home/project-web/cmph/htdocs/papers/
|
||||
fi
|
||||
Reference in New Issue
Block a user