File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ prepare_src() {
158158 if [ " $FILENAME " != " $FILE " ] && [ " $nxt " != 1 ]; then
159159 case $FILENAME in
160160 * .tar|* .tar.gz|* .tar.Z|* .tgz|* .tar.bz2|* .tbz2|* .tar.xz|* .txz|* .tar.lzma|* .zip|* .rpm)
161- if [ $( type -p bsdtar) ]; then
161+ if [ $( command -v bsdtar) ]; then
162162 COMMAND=" bsdtar -p -o -C $SRC -xf $FILENAME "
163163 else
164164 COMMAND=" tar -p -o -C $SRC -xf $FILENAME "
@@ -415,7 +415,7 @@ check_buildscript() {
415415 elif [ -z " $release " ]; then
416416 msgerr " 'release' is empty!"
417417 exit 1
418- elif [ " $( type -t build) " != " function " ]; then
418+ elif [ ! " $( command -v build) " ]; then
419419 msgerr " 'build' function not exist!"
420420 exit 1
421421 elif echo " $version " | grep -q ' -' ; then
Original file line number Diff line number Diff line change 350350
351351shift
352352
353- if [ $( type -t pkg_$opts ) ]; then
353+ if [ $( command -v pkg_$opts ) ]; then
354354 pkg_$opts " $@ "
355355else
356356 print_runhelp_msg
Original file line number Diff line number Diff line change 2020
2121EDITOR=${EDITOR:- vi}
2222
23- type -p $EDITOR > /dev/null || {
23+ command -v $EDITOR > /dev/null || {
2424 echo " Editor '$EDITOR ' not exist. Append 'EDITOR=<your editor>' to ${0##*/ } ."
2525 exit 2
2626}
You can’t perform that action at this time.
0 commit comments