gluon-core: upgrade: fix directory movement

This commit is contained in:
Matthias Schiffer 2013-10-01 21:12:36 +02:00
parent 31012af18f
commit a83b7cd5a3
1 changed files with 25 additions and 25 deletions

View File

@ -35,6 +35,7 @@ do_component() {
local version="$(version_of "$component")" local version="$(version_of "$component")"
if [ -z "$version" ]; then continue; fi if [ -z "$version" ]; then continue; fi
(
cd "$component" cd "$component"
local oldversion="$(oldversion_of "$component")" local oldversion="$(oldversion_of "$component")"
@ -56,6 +57,7 @@ do_component() {
do_dir invariant do_dir invariant
echo "$version" > "$VERSION_DIR"/"$component" echo "$version" > "$VERSION_DIR"/"$component"
)
} }
@ -66,16 +68,14 @@ if [ -z "$oldversion" ]; then oldversion="$(cat "$VERSION_FILE_FREIFUNK" 2>/dev/
if [ -z "$oldversion" ]; then oldversion="$(cat "$VERSION_FILE_LFF" 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 if [ -z "$oldversion" ]; then oldversion="$(cat "$VERSION_FILE_KFF" 2>/dev/null)"; fi
( cd "$UPGRADE_DIR"
cd "$UPGRADE_DIR"
do_component core do_component core
for component in *; do ( for component in *; do
if [ "$component" != 'core' ]; then if [ "$component" != 'core' ]; then
do_component "$component" do_component "$component"
fi fi
) done done
)
rm -f "$VERSION_FILE_FREIFUNK" "$VERSION_FILE_LFF" "$VERSION_FILE_KFF" rm -f "$VERSION_FILE_FREIFUNK" "$VERSION_FILE_LFF" "$VERSION_FILE_KFF"