Update dependency and arch checking
Use more concise methods for both.
This commit is contained in:
parent
041bc88276
commit
b42a6cb813
11
apt-cyg
11
apt-cyg
|
@ -26,18 +26,13 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
# this script requires some packages
|
# this script requires some packages
|
||||||
WGET=`type -t wget`
|
if ! type awk bzip2 tar wget xz &>/dev/null
|
||||||
BZIP2=`which bzip2 2> /dev/null`
|
|
||||||
TAR=`which tar 2> /dev/null`
|
|
||||||
GAWK=`which awk 2> /dev/null`
|
|
||||||
XZ=`which xz 2> /dev/null`
|
|
||||||
if test "-$WGET-" = "--" || test "-$BZIP2-" = "--" || test "-$TAR-" = "--" ||
|
|
||||||
test "-$GAWK-" = "--" || test "-$XZ-" = "--"
|
|
||||||
then
|
then
|
||||||
echo You must install wget, tar, gawk, xz and bzip2 to use apt-cyg.
|
echo You must install wget, tar, gawk, xz and bzip2 to use apt-cyg.
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
[ $HOSTTYPE = x86_64 ] && ARCH=x86_64 || ARCH=x86
|
||||||
|
|
||||||
function usage()
|
function usage()
|
||||||
{
|
{
|
||||||
|
@ -49,7 +44,7 @@ function usage()
|
||||||
echo ' "apt-cyg find <patterns>" to find packages matching patterns'
|
echo ' "apt-cyg find <patterns>" to find packages matching patterns'
|
||||||
echo ' "apt-cyg describe <patterns>" to describe packages matching patterns'
|
echo ' "apt-cyg describe <patterns>" to describe packages matching patterns'
|
||||||
echo ' "apt-cyg packageof <commands or files>" to locate parent packages'
|
echo ' "apt-cyg packageof <commands or files>" to locate parent packages'
|
||||||
echo 'Options:'
|
echo Options:
|
||||||
echo ' --mirror, -m <url> : set mirror'
|
echo ' --mirror, -m <url> : set mirror'
|
||||||
echo ' --cache, -c <dir> : set cache'
|
echo ' --cache, -c <dir> : set cache'
|
||||||
echo ' --file, -f <file> : read package names from file'
|
echo ' --file, -f <file> : read package names from file'
|
||||||
|
|
Loading…
Reference in New Issue