mirror of
https://github.com/outbackdingo/scratchpkg.git
synced 2026-01-28 10:20:13 +00:00
replace type with command
This commit is contained in:
4
pkgbuild
4
pkgbuild
@@ -158,7 +158,7 @@ prepare_src() {
|
||||
if [ "$FILENAME" != "$FILE" ] && [ "$nxt" != 1 ]; then
|
||||
case $FILENAME in
|
||||
*.tar|*.tar.gz|*.tar.Z|*.tgz|*.tar.bz2|*.tbz2|*.tar.xz|*.txz|*.tar.lzma|*.zip|*.rpm)
|
||||
if [ $(type -p bsdtar) ]; then
|
||||
if [ $(command -v bsdtar) ]; then
|
||||
COMMAND="bsdtar -p -o -C $SRC -xf $FILENAME"
|
||||
else
|
||||
COMMAND="tar -p -o -C $SRC -xf $FILENAME"
|
||||
@@ -415,7 +415,7 @@ check_buildscript() {
|
||||
elif [ -z "$release" ]; then
|
||||
msgerr "'release' is empty!"
|
||||
exit 1
|
||||
elif [ "$(type -t build)" != "function" ]; then
|
||||
elif [ ! "$(command -v build)" ]; then
|
||||
msgerr "'build' function not exist!"
|
||||
exit 1
|
||||
elif echo "$version" | grep -q '-'; then
|
||||
|
||||
2
pkgquery
2
pkgquery
@@ -350,7 +350,7 @@ fi
|
||||
|
||||
shift
|
||||
|
||||
if [ $(type -t pkg_$opts) ]; then
|
||||
if [ $(command -v pkg_$opts) ]; then
|
||||
pkg_$opts "$@"
|
||||
else
|
||||
print_runhelp_msg
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
EDITOR=${EDITOR:-vi}
|
||||
|
||||
type -p $EDITOR >/dev/null || {
|
||||
command -v $EDITOR >/dev/null || {
|
||||
echo "Editor '$EDITOR' not exist. Append 'EDITOR=<your editor>' to ${0##*/}."
|
||||
exit 2
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user