Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
alpine-conf
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
18
Issues
18
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alpine
alpine-conf
Commits
0b3ae89a
Commit
0b3ae89a
authored
Jul 16, 2011
by
Jeff Bilyk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setup-bootable: enhance to update apk cache on USB/CF installs if it's been setup
parent
37033af8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
setup-bootable.in
setup-bootable.in
+22
-0
No files found.
setup-bootable.in
View file @
0b3ae89a
...
...
@@ -59,6 +59,7 @@ Options:
-f Force overwrite existing files. Will overwrite syslinux.cfg if upgrade.
-h Show this help.
-u Upgrade mode. Keep existing syslinux.cfg and don't run syslinux.
If apk cache is detected, attempts to upgrade the apk cache
-s Force run syslinux, even if upgrade mode.
-v Verbose mode. Display whats going on.
...
...
@@ -176,6 +177,8 @@ elif [ -n "$srcurl" ]; then
||
die
"Failed to download or extract
$srcurl
"
fi
# make sure files are really there before we replace existing
[
-n
"
$verbose
"
]
&&
echo
"Flushing cache..."
sync
...
...
@@ -208,6 +211,25 @@ for i in $tomove; do
mv
"
$destdir
"
/.new/
$i
"
$destdir
"
/
||
die
"Failed to move
$destdir
/.new/ to
$destdir
"
done
# Update the cache folder on destdir if present
if
[
-e
"
$destdir
"
/
*
.apkovl.tar.gz
]
&&
[
-e
"
$destdir
"
/cache
]
;
then
apkovlfile
=
"
`
ls
${
destdir
}
/
*
.apkovl.tar.gz |
head
-n
1
`
"
#Get first file apk/world
worldfile
=
"
`
tar
tzf
$apkovlfile
|
grep
apk/world |
head
-n
1
`
"
apkstofetch
=
"
`
cat
$worldfile
`
"
mkdir
"
$destdir
"
/tmp.cache
# If repository update suceeds, fetch copy of all apks in world
apk update
&&
apk fetch
-R
$apkstofetch
-o
"
$destdir
"
/tmp.cache
# Copy apks to cache dir if verify passes, then re-index
apk verify
"
$destdir
"
/tmp.cache/
*
.apk
&&
mv
"
$destdir
"
/tmp.cache/
*
.apk
"
$destdir
"
/cache/
&&
apk index
-o
"
$destdir
"
/cache/APKINDEX.tar.gz
"
$destdir
"
/cache/
*
.apk
if
[
"
`
ls
${
destdir
}
/tmp.cache
`
"
==
""
]
;
then
rm
-rf
"
$destdir
"
/tmp.cache
fi
fi
# cleanup
[
-z
"
$keep_old
"
]
&&
rm
-rf
"
$destdir
"
/.old
"
$destdir
"
/.new
sync
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment