Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dm-docs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hammonds
dm-docs
Commits
9fb46676
Commit
9fb46676
authored
8 years ago
by
sveseli
Browse files
Options
Downloads
Patches
Plain Diff
cleanup
parent
758c1132
No related branches found
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
sbin/install_support.sh
+0
-27
0 additions, 27 deletions
sbin/install_support.sh
sbin/upgrade_experiment.sh
+0
-32
0 additions, 32 deletions
sbin/upgrade_experiment.sh
sbin/upgrade_user_experiment_role.sh
+0
-20
0 additions, 20 deletions
sbin/upgrade_user_experiment_role.sh
with
0 additions
and
79 deletions
sbin/install_support.sh
deleted
100755 → 0
+
0
−
27
View file @
758c1132
#!/bin/sh
DM_SVN_URL
=
https://subversion.xray.aps.anl.gov/DataManagement
MY_DIR
=
`
dirname
$0
`
&&
cd
$MY_DIR
&&
MY_DIR
=
`
pwd
`
if
[
-z
"
${
DM_ROOT_DIR
}
"
]
;
then
DM_ROOT_DIR
=
$MY_DIR
/..
fi
DM_SUPPORT_DIR
=
$DM_ROOT_DIR
/../support
execute
()
{
echo
"Executing:
$@
"
eval
"
$@
"
}
if
[
!
-d
$DM_SUPPORT_DIR
]
;
then
echo
"Creating new DM support directory
$DM_SUPPORT_DIR
."
cd
`
dirname
$DM_SUPPORT_DIR
`
execute svn
export
$DM_SVN_URL
/support support
fi
cd
$DM_SUPPORT_DIR
execute svn update
execute
$DM_SUPPORT_DIR
/bin/clean_support_all.sh
execute
$DM_SUPPORT_DIR
/bin/install_support_all.sh
This diff is collapsed.
Click to expand it.
sbin/upgrade_experiment.sh
deleted
100755 → 0
+
0
−
32
View file @
758c1132
#!/bin/sh
TABLE
=
experiment
CURRENT_DIR
=
`
pwd
`
MY_DIR
=
`
dirname
$0
`
&&
cd
$MY_DIR
&&
MY_DIR
=
`
pwd
`
cd
$CURRENT_DIR
POPULATE_SCRIPT
=
populate_
$TABLE
.sql
EXPERIMENT_STATION_FILE
=
$MY_DIR
/experiment_station.txt
cp
$POPULATE_SCRIPT
$POPULATE_SCRIPT
.new
experimentList
=
`
cat
$POPULATE_SCRIPT
|
grep
INSERT |
awk
'{print $13}'
`
# correct insert statements
cmd
=
"cat
$POPULATE_SCRIPT
.new | sed
\"
s?name,?name, experiment_station_id, ?g
\"
>
$POPULATE_SCRIPT
.new.2 && mv
$POPULATE_SCRIPT
.new.2
$POPULATE_SCRIPT
.new"
eval
$cmd
||
exit
1
# insert station id for each experiment
for
e
in
$experimentList
;
do
eName
=
`
echo
$e
|
sed
"s?'??g"
|
sed
"s?,??g"
`
echo
"Working on experiment
$eName
"
echo
"Executing: cat
$EXPERIMENT_STATION_FILE
| grep
$eName
| head -1 | cut -f2 -d','"
stationId
=
`
cat
$EXPERIMENT_STATION_FILE
|
grep
$eName
|
head
-1
|
cut
-f2
-d
','
`
if
[
-z
"
$stationId
"
]
;
then
stationId
=
1
# test station id
fi
echo
"Mapped
$eName
=>
$stationId
"
cmd
=
"cat
$POPULATE_SCRIPT
.new | sed
\"
s?
$e
?
$e
$stationId
,?g
\"
>
$POPULATE_SCRIPT
.new.2 && mv
$POPULATE_SCRIPT
.new.2
$POPULATE_SCRIPT
.new"
eval
$cmd
||
exit
1
done
This diff is collapsed.
Click to expand it.
sbin/upgrade_user_experiment_role.sh
deleted
100755 → 0
+
0
−
20
View file @
758c1132
#!/bin/sh
TABLE
=
user_experiment_role
CURRENT_DIR
=
`
pwd
`
MY_DIR
=
`
dirname
$0
`
&&
cd
$MY_DIR
&&
MY_DIR
=
`
pwd
`
cd
$CURRENT_DIR
POPULATE_SCRIPT
=
populate_
$TABLE
.sql
cp
$POPULATE_SCRIPT
$POPULATE_SCRIPT
.new
# eliminate old manager role
cat
$POPULATE_SCRIPT
.new |
grep
-v
"2)"
>
$POPULATE_SCRIPT
.new.2
&&
mv
$POPULATE_SCRIPT
.new.2
$POPULATE_SCRIPT
.new
||
exit
1
# fix old PI role
cat
$POPULATE_SCRIPT
.new |
sed
's?3)?1)?g'
>
$POPULATE_SCRIPT
.new.2
&&
mv
$POPULATE_SCRIPT
.new.2
$POPULATE_SCRIPT
.new
||
exit
1
# fix old user role
cat
$POPULATE_SCRIPT
.new |
sed
's?4)?2)?g'
>
$POPULATE_SCRIPT
.new.2
&&
mv
$POPULATE_SCRIPT
.new.2
$POPULATE_SCRIPT
.new
||
exit
1
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