gluon-core: upgrade: fix directory movement
This commit is contained in:
parent
568cfbf398
commit
00a97602a4
@ -35,27 +35,29 @@ 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")"
|
||||||
if [ -z "$oldversion" ]; then
|
if [ -z "$oldversion" ]; then
|
||||||
do_dir initial
|
do_dir initial
|
||||||
else
|
else
|
||||||
local v
|
local v
|
||||||
|
|
||||||
for v in *; do
|
for v in *; do
|
||||||
if [ "$v" = initial -o "$v" = invariant -o "$v" = version ]; then continue; fi
|
if [ "$v" = initial -o "$v" = invariant -o "$v" = version ]; then continue; fi
|
||||||
|
|
||||||
# The return value of opkg compare-versions is negated
|
# The return value of opkg compare-versions is negated
|
||||||
if ! opkg compare-versions "$v" '>>' "$oldversion"; then
|
if ! opkg compare-versions "$v" '>>' "$oldversion"; then
|
||||||
do_dir "$v"
|
do_dir "$v"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
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"
|
||||||
|
Loading…
Reference in New Issue
Block a user