Commits

Erik Southworth  committed 6c21e9c Draft

fix some printf bashisms

  • Participants
  • Parent commits 626ace1

Comments (0)

Files changed (1)

File src/boiler.in

 	    fi
 
 	    if [ $? -eq 0 ]; then break; fi
-	    i=$[$i+1]
+	    i=$(($i+1))
 	done
 	[ $i -eq 3 ] &&
 	${error:?Executing: \`${BIN} ${cmd[@]}\' in ($iter) tries: exited with exit code ${RETVAL-$?}}
 	    # is link, check if correct
 	    link_target=$(readlink --canonicalize "${steamlink}")
 	    if test "${link_target}" = "${FILENAME}"; then
-		    printf -v reply "${GREEN}ok${NORMAL}\n"
+		reply=$(printf "${GREEN}ok${NORMAL}")
 	    else
-		    printf -v reply "${RED}bad -> \`${link_target}'${NORMAL}"
-		    action=Repairing
+		action=Repairing; reply=$(printf "${RED}bad -> \`${link_target}'${NORMAL}")
+
 	    fi
 	elif ! test -e "${steamlink}"; then
-	    printf -v reply "${RED}missing${NORMAL}"
-	    action=Creating
+	    action=Creating; reply=$(printf "${RED}missing${NORMAL}")
 	elif test -x "${steamlink}"; then
-	    printf -v reply "${RED}program${NORMAL}"
-	    action=WARNING
+	    action=WARNING; reply=$(printf "${RED}program${NORMAL}")
 	elif test -f "${steamlink}"; then
-	    printf -v reply "${RED}file${NORMAL}"
-	    action=WARNING
+	    action=WARNING; reply=$(printf "${RED}file${NORMAL}")
 	else
-	    printf -v reply "${RED}unknown${NORMAL}"
-	    action=WARNING
+	    action=WARNING; reply=$(printf "${RED}unknown${NORMAL}")
+
 	fi
 
 	printf "\n\n${YELLOW}+ Checking steam symlink in ${rundir} ... \t${reply}${NORMAL}"
 
 	elif [ "${action}" = "WARNING" ]; then
 	    printf "\n${RED}${action}: Conflict file type ${steamlink}. Expected symlink. Ignore if intentional.${NORMAL}\n"
+	else
+	    echo #no action, symlink is ok
 	fi
 }