Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
982e7b6e
Commit
982e7b6e
authored
Jun 26, 2013
by
Kaarle Ritvanen
Committed by
Serge Hallyn
Jun 27, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lxc-alpine: option for specifying the release to be installed
Signed-off-by:
Kaarle Ritvanen
<
kaarle.ritvanen@datakunkku.fi
>
Signed-off-by:
Serge Hallyn
<
serge.hallyn@ubuntu.com
>
parent
85b41c7d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
7 deletions
+16
-7
lxc-alpine.in
templates/lxc-alpine.in
+16
-7
No files found.
templates/lxc-alpine.in
View file @
982e7b6e
...
...
@@ -10,14 +10,16 @@ get_static_apk () {
if
[
-z
"
$repository
"
]
;
then
url
=
http://wiki.alpinelinux.org/cgi-bin/dl.cgi
echo
-n
"Determining the latest release... "
release
=
$(
$wget
$url
/.latest.
$apk_arch
.txt |
\
cut
-d
" "
-f
3 |
cut
-d
/
-f
1 |
uniq
)
if
[
-z
"
$release
"
]
;
then
echo
failed
return
1
echo
-n
"Determining the latest release... "
release
=
$(
$wget
$url
/.latest.
$apk_arch
.txt |
\
cut
-d
" "
-f
3 |
cut
-d
/
-f
1 |
uniq
)
if
[
-z
"
$release
"
]
;
then
echo
failed
return
1
fi
echo
$release
fi
echo
$release
auto_repo_dir
=
$release
/main
repository
=
$url
/
$auto_repo_dir
pkglist
=
$pkglist
:alpine-mirrors
...
...
@@ -222,7 +224,8 @@ die() {
usage
()
{
cat
>
&2
<<
EOF
Usage:
$(
basename
$0
)
[-h|--help] [-r|--repository <url>] [-a|--arch <arch>]
Usage:
$(
basename
$0
)
[-h|--help] [-r|--repository <url>]
[-R|--release <release>] [-a|--arch <arch>]
[--rootfs <rootfs>] -p|--path <path> -n|--name <name>
[PKG...]
EOF
...
...
@@ -240,6 +243,7 @@ optarg_check() {
}
default_path
=
@LXCPATH@
release
=
arch
=
$(
uname
-m
)
while
[
$#
-gt
0
]
;
do
...
...
@@ -270,6 +274,11 @@ while [ $# -gt 0 ]; do
repository
=
$1
shift
;;
-R
|
--release
)
optarg_check
$opt
"
$1
"
release
=
$1
shift
;;
-a
|
--arch
)
optarg_check
$opt
"
$1
"
arch
=
$1
...
...
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