mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-12-07 19:03:16 +00:00
Move all output to the directories it will be in eventually
Signed-off-by: Justin Cormack <justin@specialbusservice.com>
This commit is contained in:
committed by
Justin Cormack
parent
a225fb66b4
commit
b1597ff9a9
21
alpine/packages/mobyplatform/usr/bin/mobyplatform
Executable file
21
alpine/packages/mobyplatform/usr/bin/mobyplatform
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Returns the platform we are running on
|
||||
|
||||
# return the value matching the kvpair in the command line
|
||||
kvpair()
|
||||
{
|
||||
awk -v flag=$1 '{
|
||||
for(i = 1; i <= NF; i++) {
|
||||
split($i, kvpair, "=");
|
||||
if(kvpair[1] == flag) {
|
||||
printf kvpair[2];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}' /proc/cmdline
|
||||
}
|
||||
|
||||
PLATFORM=$(kvpair mobyplatform)
|
||||
|
||||
[ -z ${PLATFORM} ] && printf unknown || printf ${PLATFORM}
|
||||
Reference in New Issue
Block a user