git clone https://git.lucas.co/fontpreview.git
Use double square brackets instead of single ones
As fontpreview is now using Bash instead of POSIX sh(1), there is no
need to use single square brackets.
fontpreview | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fontpreview b/fontpreview
index f9595f0..70eda23 100755
--- a/fontpreview
+++ b/fontpreview
@@ -102,7 +102,7 @@ main(){
generate_preview "$font"
- if [ $FIRST_RUN == true ]; then
+ if [[ $FIRST_RUN == true ]]; then
FIRST_RUN=false
# Display the font preview using sxiv
@@ -119,9 +119,9 @@ main(){
echo $! >"$PIDFILE"
# Check for crashes of sxvi
- elif [ -f $PIDFILE ] ; then
+ elif [[ -f $PIDFILE ]] ; then
PID=$(cat $PIDFILE)
- if [ ! -e /proc/$PID ] ; then
+ if [[ ! -e /proc/$PID ]] ; then
echo "Restart sxvi - You maybe using a obsolete version. " >&2
# Display the font preview using sxiv
sxiv -g "$SIZE$POSITION" -N "fontpreview" -b "$FONT_PREVIEW" &