Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F60565026
tools.sh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, May 1, 03:26
Size
657 B
Mime Type
text/x-shellscript
Expires
Fri, May 3, 03:26 (2 d)
Engine
blob
Format
Raw Data
Handle
17375603
Attached To
R1066 amc-cape
tools.sh
View Options
#!/bin/bash
function
check_OS
()
{
OS
=
$(
uname | tr
"[A-Z]"
"[a-z]"
)
if
[
"$OS"
==
"linux"
]
;
then return
0;
fi
OS
=
"unknown"
return
1
}
function
check_OS_subtype
()
{
OS_SUBTYPE
=
"unknown"
if
[
-r /etc/gentoo-release
]
;
then
OS_SUBTYPE
=
"gentoo"
;
return
0;
fi
return
1
}
function
check_AMC_version
()
{
AMC_VERSION
=
"unknown"
which auto-multiple-choice > /dev/null 2>&1
if
[
$?
-gt 0
]
;
then
AMC_VERSION
=
"none"
return
1
fi
case
$OS
in
"linux"
)
case
$OS_SUBTYPE
in
"gentoo"
)
AMC_VERSION
=
$(
eix --xml auto-multiple-choice | grep
'installed="1"'
| tr
" "
"\n"
| grep
'^id'
| cut -d
'"'
-f 2
)
return
0;;
esac
esac
return
1
}
# EOF
Event Timeline
Log In to Comment