author | haftmann |
Tue, 26 Jun 2012 22:09:34 +0200 | |
changeset 48150 | c97656ff4154 |
child 48151 | a80595d4f850 |
permissions | -rw-r--r-- |
48150
c97656ff4154
snippet to be sourced in user settings file in order to initialize components for a repository revision;
haftmann
parents:
diff
changeset
|
1 |
# -*- shell-script -*- :mode=shellscript: |
c97656ff4154
snippet to be sourced in user settings file in order to initialize components for a repository revision;
haftmann
parents:
diff
changeset
|
2 |
# |
c97656ff4154
snippet to be sourced in user settings file in order to initialize components for a repository revision;
haftmann
parents:
diff
changeset
|
3 |
# Author: Florian Haftmann, TU Muenchen |
c97656ff4154
snippet to be sourced in user settings file in order to initialize components for a repository revision;
haftmann
parents:
diff
changeset
|
4 |
# |
c97656ff4154
snippet to be sourced in user settings file in order to initialize components for a repository revision;
haftmann
parents:
diff
changeset
|
5 |
# init_components - bash source script to initialize components |
c97656ff4154
snippet to be sourced in user settings file in order to initialize components for a repository revision;
haftmann
parents:
diff
changeset
|
6 |
# as specified in the Admin directory |
c97656ff4154
snippet to be sourced in user settings file in order to initialize components for a repository revision;
haftmann
parents:
diff
changeset
|
7 |
|
c97656ff4154
snippet to be sourced in user settings file in order to initialize components for a repository revision;
haftmann
parents:
diff
changeset
|
8 |
function init_component_liberal |
c97656ff4154
snippet to be sourced in user settings file in order to initialize components for a repository revision;
haftmann
parents:
diff
changeset
|
9 |
{ |
c97656ff4154
snippet to be sourced in user settings file in order to initialize components for a repository revision;
haftmann
parents:
diff
changeset
|
10 |
local LOCATION="$1" |
c97656ff4154
snippet to be sourced in user settings file in order to initialize components for a repository revision;
haftmann
parents:
diff
changeset
|
11 |
[[ -d "${LOCATION}" ]] || echo "Warning: no component found in ${LOCATION}" && return |
c97656ff4154
snippet to be sourced in user settings file in order to initialize components for a repository revision;
haftmann
parents:
diff
changeset
|
12 |
init_component "${LOCATION}" |
c97656ff4154
snippet to be sourced in user settings file in order to initialize components for a repository revision;
haftmann
parents:
diff
changeset
|
13 |
} |
c97656ff4154
snippet to be sourced in user settings file in order to initialize components for a repository revision;
haftmann
parents:
diff
changeset
|
14 |
|
c97656ff4154
snippet to be sourced in user settings file in order to initialize components for a repository revision;
haftmann
parents:
diff
changeset
|
15 |
while { unset REPLY; read -r; test "$?" = 0 -o -n "${REPLY}"; } |
c97656ff4154
snippet to be sourced in user settings file in order to initialize components for a repository revision;
haftmann
parents:
diff
changeset
|
16 |
do |
c97656ff4154
snippet to be sourced in user settings file in order to initialize components for a repository revision;
haftmann
parents:
diff
changeset
|
17 |
case "${REPLY}" in |
c97656ff4154
snippet to be sourced in user settings file in order to initialize components for a repository revision;
haftmann
parents:
diff
changeset
|
18 |
\#* | "") ;; |
c97656ff4154
snippet to be sourced in user settings file in order to initialize components for a repository revision;
haftmann
parents:
diff
changeset
|
19 |
/*) init_component_liberal "${REPLY}" ;; |
c97656ff4154
snippet to be sourced in user settings file in order to initialize components for a repository revision;
haftmann
parents:
diff
changeset
|
20 |
*) init_component_liberal "${COMPONENT}/${REPLY}" ;; |
c97656ff4154
snippet to be sourced in user settings file in order to initialize components for a repository revision;
haftmann
parents:
diff
changeset
|
21 |
esac |
c97656ff4154
snippet to be sourced in user settings file in order to initialize components for a repository revision;
haftmann
parents:
diff
changeset
|
22 |
done < "${ISABELLE_HOME}/Admin/components" |