[Scripts] Do some fixes.

This commit is contained in:
Dave Davenport 2019-02-02 12:35:37 +01:00
parent 83995a738a
commit b30b50dc5a
6 changed files with 6 additions and 6 deletions

View File

@ -64,7 +64,7 @@ then
sed -i "s|${ROFI_FB_CUR_DIR}|##deleted##|g" "${ROFI_FB_HISTORY_FILE}"
sed -i '/##deleted##/d' "${ROFI_FB_HISTORY_FILE}"
echo "${ROFI_FB_CUR_DIR}" >> "${ROFI_FB_HISTORY_FILE}"
if [ $(cat "${ROFI_FB_HISTORY_FILE}" | wc -l) -gt ${ROFI_FB_HISTORY_MAXCOUNT} ]
if [ $( wc -l < "${ROFI_FB_HISTORY_FILE}" ) -gt ${ROFI_FB_HISTORY_MAXCOUNT} ]
then
sed -i 1d "${ROFI_FB_HISTORY_FILE}"
fi

View File

@ -23,7 +23,7 @@ xdotool key Return
# Get result, kill xvfb
wait ${RPID}
RETV=$?
OUTPUT=$(cat output.txt | tr '\n' ' ')
OUTPUT=$( tr '\n' ' ' < output.txt )
if [ "${OUTPUT}" != 'coffee ' ]
then
exit 1

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash
cat /dev/null | rofi -dmenu &
rofi -dmenu & < /dev/null
RPID=$!
sleep 4
xdotool key Return

View File

@ -24,7 +24,7 @@ then
echo "thread apply all bt" | gdb rofi core.*
fi
OUTPUT=$(cat output.txt | tr '\n' ' ')
OUTPUT=$( tr '\n' ' ' < output.txt )
if [ "${OUTPUT}" != 'noot mies ' ]
then
echo "Got: '${OUTPUT}' expected 'noot mies '"

View File

@ -21,7 +21,7 @@ xdotool key Escape
# Get result, kill xvfb
wait ${RPID}
RETV=$?
OUTPUT=$(cat output.txt | tr '\n' ' ')
OUTPUT=$(tr '\n' ' ' < output.txt)
if [ "${OUTPUT}" != '' ]
then
echo "Got: '${OUTPUT}' expected nothing"

View File

@ -17,7 +17,7 @@ xdotool key Return
# Get result, kill xvfb
wait ${RPID}
RETV=$?
OUTPUT=$(cat output.txt | tr '\n' ' ')
OUTPUT=$( tr '\n' ' ' < output.txt )
echo ${OUTPUT}
if [ "${OUTPUT}" != 'noot ' ]
then