gluon-core: always handle core scripts first

This commit is contained in:
Matthias Schiffer 2013-10-01 20:22:54 +02:00
parent fa1774a4e6
commit 2d93cad89d

View File

@ -27,18 +27,8 @@ do_dir() {
fi
}
version="$(version_of gluon-core)"
oldversion="$(cat "$VERSION_FILE" 2>/dev/null)"
if [ -z "$oldversion" ]; then oldversion="$(cat "$VERSION_FILE_FREIFUNK" 2>/dev/null)"; fi
if [ -z "$oldversion" ]; then oldversion="$(cat "$VERSION_FILE_LFF" 2>/dev/null)"; fi
if [ -z "$oldversion" ]; then oldversion="$(cat "$VERSION_FILE_KFF" 2>/dev/null)"; fi
(
cd "$UPGRADE_DIR"
for component in *; do (
do_component() {
local component="$1"
local version="$(version_of "$component")"
if [ -z "$version" ]; then continue; fi
@ -63,6 +53,25 @@ if [ -z "$oldversion" ]; then oldversion="$(cat "$VERSION_FILE_KFF" 2>/dev/null)
do_dir invariant
echo "$version" > "$VERSION_DIR"/"$component"
}
version="$(version_of core)"
oldversion="$(cat "$VERSION_FILE" 2>/dev/null)"
if [ -z "$oldversion" ]; then oldversion="$(cat "$VERSION_FILE_FREIFUNK" 2>/dev/null)"; fi
if [ -z "$oldversion" ]; then oldversion="$(cat "$VERSION_FILE_LFF" 2>/dev/null)"; fi
if [ -z "$oldversion" ]; then oldversion="$(cat "$VERSION_FILE_KFF" 2>/dev/null)"; fi
(
cd "$UPGRADE_DIR"
do_compoment core
for component in *; do (
if [ "$component" != 'core' ]; then
do_component "$component"
fi
) done
)