Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tools/sof-boot-once.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ boot_once_flag=${boot_once_flag/:*/}
if [ "$#" -ne 0 ]; then
# convert cmd to the cmd full path, because in the rc.local it just support PATH=/bin:/sbin:/usr/bin:/usr/sbin
cmd_path=$(dirname $(which $1) 2>/dev/null)
if [ "X${cmd_path/\/*/}" == "X." ]; then #relative path
if [ "X${cmd_path/\/*/}" == "X." -o -d "$cmd_path" ]; then #relative path
cd $cmd_path
cmd=$PWD/$(basename $1)
cd $OLD_PATH
shift
elif [ "X${cmd_path:0:1}" == "X/" ]; then #absolute path
cmd=$cmd_path/$(basename $1)
shift
elif [ "${type -t $(basename $1)}" == "builtin" ]; then
elif [ "$(type -t $(basename $1))" == "builtin" ]; then #shell builtin command
cmd=$(basename $1)
shift
else # Miss cmd_path means couldn't find this cmd in the path, so no change
Expand Down