From c0af2434033397c962d899231e149f67936bee14 Mon Sep 17 00:00:00 2001 From: Markus Gans Date: Sat, 2 Apr 2016 18:35:34 +0200 Subject: [PATCH] small shell script improvements --- README.md | 2 +- scripts/profile.sh | 4 ++-- scripts/show_graph_font.sh | 1 - src/fonts/bdf2c.sh | 4 ++-- src/fonts/font2c.sh | 2 +- 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 269c08c7..bec9de20 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ ``` > git clone git://github.com/gansm/finalcut.git > cd finalcut -> ./configure --prefix=/usrX +> ./configure --prefix=/usr > make > su -c "make install" ``` diff --git a/scripts/profile.sh b/scripts/profile.sh index 036fcf3b..49e083c5 100755 --- a/scripts/profile.sh +++ b/scripts/profile.sh @@ -1,11 +1,11 @@ #!/bin/bash DIR="$PWD" -cd ../test/.libs/ +cd ../test/.libs/ || exit LD_LIBRARY_PATH=../../src/.libs/ ./ui gprof ./ui >./profile.txt rm ./gmon.out less ./profile.txt rm ./profile.txt -cd "$DIR" +cd "$DIR" || exit diff --git a/scripts/show_graph_font.sh b/scripts/show_graph_font.sh index cc5cb4e7..f22288e2 100755 --- a/scripts/show_graph_font.sh +++ b/scripts/show_graph_font.sh @@ -1,4 +1,3 @@ #!/bin/bash xfd -center -columns 16 -fn -misc-8x16graph-medium-r-normal--17-160-75-75-*-80-iso8859-1 - diff --git a/src/fonts/bdf2c.sh b/src/fonts/bdf2c.sh index 0f1c6abc..0286e1e2 100755 --- a/src/fonts/bdf2c.sh +++ b/src/fonts/bdf2c.sh @@ -14,12 +14,12 @@ FONTFILE="8x16graph.bdf" | tr '\n' ',' \ | sed -e 's/BITMAP,//g' \ | sed -e 's/--,/\n/g' \ - | tr '[A-Z]' '[a-z]' \ + | tr '[:upper:]' '[:lower:]' \ | sed -e 's/,/, /g' \ | sed -e 's/\([0-9a-f][0-9a-f]\)/0x\1/g' \ | sed -e 's/^0/ 0/g' \ | sed -e '$s/, $/ \n/' \ - | while IFS=$'\n'; read LINE + | while IFS=$'\n'; read -r LINE do echo "$LINE /* $N */" let N++ diff --git a/src/fonts/font2c.sh b/src/fonts/font2c.sh index e685c961..584f45d0 100755 --- a/src/fonts/font2c.sh +++ b/src/fonts/font2c.sh @@ -13,7 +13,7 @@ FONTFILE="8x16std" | sed -e 's/ {$/\n{/' \ | sed -e 's/^unsigned/static unsigned/' \ | sed -e '/len = /d' \ - | while IFS=$'\n'; read LINE + | while IFS=$'\n'; read -r LINE do if [ "${LINE:0:1}" != " " ] then