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")"
|
||||
if [ -z "$version" ]; then continue; fi
|
||||
|
||||
cd "$component"
|
||||
(
|
||||
cd "$component"
|
||||
|
||||
local oldversion="$(oldversion_of "$component")"
|
||||
if [ -z "$oldversion" ]; then
|
||||
do_dir initial
|
||||
else
|
||||
local v
|
||||
local oldversion="$(oldversion_of "$component")"
|
||||
if [ -z "$oldversion" ]; then
|
||||
do_dir initial
|
||||
else
|
||||
local v
|
||||
|
||||
for v in *; do
|
||||
if [ "$v" = initial -o "$v" = invariant -o "$v" = version ]; then continue; fi
|
||||
for v in *; do
|
||||
if [ "$v" = initial -o "$v" = invariant -o "$v" = version ]; then continue; fi
|
||||
|
||||
# The return value of opkg compare-versions is negated
|
||||
if ! opkg compare-versions "$v" '>>' "$oldversion"; then
|
||||
do_dir "$v"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
# The return value of opkg compare-versions is negated
|
||||
if ! opkg compare-versions "$v" '>>' "$oldversion"; then
|
||||
do_dir "$v"
|
||||
fi
|
||||
done
|
||||
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_KFF" 2>/dev/null)"; fi
|
||||
|
||||
(
|
||||
cd "$UPGRADE_DIR"
|
||||
cd "$UPGRADE_DIR"
|
||||
|
||||
do_component core
|
||||
do_component core
|
||||
|
||||
for component in *; do (
|
||||
if [ "$component" != 'core' ]; then
|
||||
do_component "$component"
|
||||
fi
|
||||
) done
|
||||
)
|
||||
for component in *; do
|
||||
if [ "$component" != 'core' ]; then
|
||||
do_component "$component"
|
||||
fi
|
||||
done
|
||||
|
||||
rm -f "$VERSION_FILE_FREIFUNK" "$VERSION_FILE_LFF" "$VERSION_FILE_KFF"
|
||||
|
Loading…
Reference in New Issue
Block a user