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
19
Issues
19
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
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
63a3fbcf
Commit
63a3fbcf
authored
Jan 26, 2015
by
Kaarle Ritvanen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update-kernel: option for overriding architecture
parent
33da382f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
11 deletions
+22
-11
update-kernel.in
update-kernel.in
+22
-11
No files found.
update-kernel.in
View file @
63a3fbcf
...
@@ -15,6 +15,7 @@ VIRTUAL=.tmp-$SCRIPT
...
@@ -15,6 +15,7 @@ VIRTUAL=.tmp-$SCRIPT
SUPERUSER
=
SUPERUSER
=
[
$(
id
-u
)
-eq
0
]
&&
SUPERUSER
=
Y
[
$(
id
-u
)
-eq
0
]
&&
SUPERUSER
=
Y
ARCH
=
BUILDDIR
=
BUILDDIR
=
FLAVOR
=
FLAVOR
=
MNTDIR
=
MNTDIR
=
...
@@ -30,13 +31,15 @@ error() {
...
@@ -30,13 +31,15 @@ error() {
usage
()
{
usage
()
{
[
"
$2
"
]
&&
error
"
$2
"
[
"
$2
"
]
&&
error
"
$2
"
local
opts
=
"[-F <feature>]... [-p <package>]..."
local
opts
=
"[-F <feature>]... [-p <package>]..."
local
dest_args
=
"[-a <arch>] <dest_dir>"
cat
>
&2
<<
EOF
cat
>
&2
<<
EOF
Syntax:
$SCRIPT
$opts
[
<dest_dir>
]
Syntax:
$SCRIPT
$opts
[
$dest_args
]
$SCRIPT
-f <flavor>
$opts
<dest_dir>
$SCRIPT
-f <flavor>
$opts
$dest_args
$SCRIPT
-b <build_dir>
$opts
[
<dest_dir>
]
$SCRIPT
-b <build_dir>
$opts
[
$dest_args
]
Options: -b|--build <build_dir> Install custom-built kernel
Options: -a|--arch <arch> Install kernel for specified architecture
-b|--build <build_dir> Install custom-built kernel
-f|--flavor <flavor> Install kernel of specified flavor
-f|--flavor <flavor> Install kernel of specified flavor
-F|--feature <feature> Enable initfs feature
-F|--feature <feature> Enable initfs feature
-p|--package <package> Additional module or firmware package
-p|--package <package> Additional module or firmware package
...
@@ -47,30 +50,34 @@ EOF
...
@@ -47,30 +50,34 @@ EOF
}
}
QUIET_OPT
=
"--quiet"
QUIET_OPT
=
"--quiet"
OPTS
=
$(
getopt
-l
build-dir:,flavor:,feature:,help,package:,verbose
-n
$SCRIPT
\
OPTS
=
$(
getopt
-l
arch
:,build-dir:,flavor:,feature:,help,package:,verbose
\
-o
b:f:F:hp:v
--
"
$@
"
)
||
usage 1
-n
$SCRIPT
-o
a:
b:f:F:hp:v
--
"
$@
"
)
||
usage 1
eval set
--
"
$OPTS
"
eval set
--
"
$OPTS
"
while
:
;
do
while
:
;
do
case
"
$1
"
in
case
"
$1
"
in
-a
|
--arch
)
shift
ARCH
=
$1
;;
-b
|
--build-dir
)
-b
|
--build-dir
)
BUILDDIR
=
$2
shift
shift
BUILDDIR
=
$1
;;
;;
-f
|
--flavor
)
-f
|
--flavor
)
FLAVOR
=
$2
shift
shift
FLAVOR
=
$1
;;
;;
-F
|
--feature
)
-F
|
--feature
)
features
=
"
$features
$2
"
shift
shift
features
=
"
$features
$1
"
;;
;;
-h
|
--help
)
-h
|
--help
)
echo
"
$SCRIPT
@VERSION@"
>
&2
echo
"
$SCRIPT
@VERSION@"
>
&2
usage 0
usage 0
;;
;;
-p
|
--package
)
-p
|
--package
)
PACKAGES
=
"
$PACKAGES
$2
"
shift
shift
PACKAGES
=
"
$PACKAGES
$1
"
;;
;;
-v
|
--verbose
)
-v
|
--verbose
)
QUIET_OPT
=
QUIET_OPT
=
...
@@ -89,6 +96,9 @@ DESTDIR=$2
...
@@ -89,6 +96,9 @@ DESTDIR=$2
usage 1
"Cannot specify both build directory and flavor"
usage 1
"Cannot specify both build directory and flavor"
if
[
-z
"
$DESTDIR
"
]
;
then
if
[
-z
"
$DESTDIR
"
]
;
then
[
"
$ARCH
"
]
&&
\
usage 1
"Cannot specify architecture when updating the current kernel"
[
"
$FLAVOR
"
]
&&
\
[
"
$FLAVOR
"
]
&&
\
usage 1
"Cannot specify flavor when updating the current kernel"
usage 1
"Cannot specify flavor when updating the current kernel"
...
@@ -166,7 +176,8 @@ _apk() {
...
@@ -166,7 +176,8 @@ _apk() {
wrapper
=
"fakeroot
$opt
-s
$fake_env
--"
wrapper
=
"fakeroot
$opt
-s
$fake_env
--"
fi
fi
$wrapper
apk
$cmd
$QUIET_OPT
-p
$ROOT
--keys-dir
/etc/apk/keys
\
$wrapper
apk
$cmd
$QUIET_OPT
-p
$ROOT
${
ARCH
:+--arch
"
$ARCH
"
}
\
--keys-dir
/etc/apk/keys
\
--repositories-file
/etc/apk/repositories
$*
--repositories-file
/etc/apk/repositories
$*
}
}
...
...
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