Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CTDAS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
NearRealTimeCTDAS
CTDAS
Commits
191c1905
Commit
191c1905
authored
11 years ago
by
Peters, Wouter
Browse files
Options
Downloads
Patches
Plain Diff
more checking of options
parent
dc4943aa
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
start_ctdas.sh
+44
-3
44 additions, 3 deletions
start_ctdas.sh
with
44 additions
and
3 deletions
start_ctdas.sh
+
44
−
3
View file @
191c1905
#! /bin/sh
#!/bin/bash
set
-e
cat
>
heredocfile.txt
<<
_EOF_
where <projectdir> is a base folder for the project
and <projectname> is a name to use for the project.
!! A folder projectdir/projectname will be created !!
_EOF_
while
getopts
"h"
opt
;
do
case
$opt
in
h
)
cat
heredocfile.txt
exit
1
;;
\?
)
echo
"Invalid option: -
$OPTARG
"
>
&2
exit
1
;;
*
)
cat
heredocfile.txt
exit
1
;;
esac
done
EXPECTED_ARGS
=
2
E_BADARGS
=
666
if
[
$#
-ne
$EXPECTED_ARGS
]
then
echo
""
echo
"Usage:
`
basename
$0
`
projectdir projectname"
cat
heredocfile.txt
exit
$E_BADARGS
fi
echo
"New project to be started in folder
$1
"
echo
" ...........with name
$2
"
...
...
@@ -7,8 +40,13 @@ rootdir=$1/$2
rundir
=
$1
/
$2
/exec
sedrundir
=
$1
/
$2
/exec
if
[
-d
"
$rootdir
"
]
;
then
echo
"Directory already exists, please remove before running
$0
"
exit
1
fi
mkdir
-p
${
rundir
}
rsync
-au
vz
--cvs-exclude
*
${
rundir
}
/
rsync
-au
--cvs-exclude
*
${
rundir
}
/
cd
${
rundir
}
echo
"Creating jb file, py file, and rc-file"
...
...
@@ -22,8 +60,11 @@ rm -f start_ctdas.sh
chmod
u+x
$2
.jb
echo
""
echo
"************* NOW USE ****************"
ls
-lrta
$2
.
*
echo
"**************************************"
echo
"after cd
${
rundir
}
"
echo
""
cd
${
rundir
}
pwd
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment