summaryrefslogtreecommitdiff
path: root/meson/evas_loader_conf.sh
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2019-04-10 22:40:55 +0200
committerBoris Faure <billiob@gmail.com>2019-04-10 22:42:59 +0200
commit7cc0e3ea054118584e30371b9f8cbb9d2519991d (patch)
tree47037075fb875c11745ee58f1de1d5ef3e977b8a /meson/evas_loader_conf.sh
parentfeaf0e92995d7cb27055e1588df21a8f4376424a (diff)
meson: skip trailing dot if any + more posix compliant
Diffstat (limited to 'meson/evas_loader_conf.sh')
-rwxr-xr-xmeson/evas_loader_conf.sh20
1 files changed, 12 insertions, 8 deletions
diff --git a/meson/evas_loader_conf.sh b/meson/evas_loader_conf.sh
index 19b6b2f776..5fd4259f8f 100755
--- a/meson/evas_loader_conf.sh
+++ b/meson/evas_loader_conf.sh
@@ -1,15 +1,19 @@
1#!/bin/sh 1#!/bin/sh
2 2
3original_loader=$1
4filename="$(basename $original_loader)"
5ext="${ext##*.}" 3ext="${ext##*.}"
6original_name="$(basename $original_loader .$ext)" 4# skip trailing dot if any
7loader_dir="$(dirname $original_loader)" 5case "$1" in
8loader="$(basename $original_loader)" 6 *.) original_loader=${1%?};;
9loader_name="$(echo $original_name | cut -f 1 -d '.')" 7 *) original_loader=$1;;
8esac
9original_name="$(basename "$original_loader")"
10loader_dir="$(dirname "$original_loader")"
11loader="$(basename "$original_loader")"
12loader_name="$(echo "$loader" | cut -f 1 -d '.')"
10 13
11if test `echo -n ${original_loader} | tail -c 3` = "$ext"; then 14original_ext="$(echo "$loader" | tail -c 4)"
12 mv "$DESTDIR"/"$original_loader" "$DESTDIR"/"$loader_dir"/"$original_name" 15if test "$original_ext" = "$ext" ; then
16 mv "$DESTDIR"/"$original_loader" "$DESTDIR"/"$loader_dir"/"$original_name"
13fi 17fi
14 18
15shift 19shift