summaryrefslogtreecommitdiff
path: root/meson/evas_loader_conf.sh
blob: bacc3660a11e8f345bba4641c3d5262eb2199d2e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

ext="${ext##*.}"
# skip trailing dot if any
case "$1" in 
    *.) original_loader=${1%?};;
    *) original_loader=$1;;
esac
original_name="$(basename "$original_loader")"
loader_dir="$(dirname "$original_loader")"
loader="$(basename "$original_loader")"
loader_name="$(echo "$loader" | cut -f 1 -d '.')"

original_ext="$(echo "$loader" | tail -c 4)"
if test "$original_ext" = "$ext" ; then
    mv "$DESTDIR""$original_loader" "$DESTDIR""$loader_dir"/"$original_name"
fi

shift
for x in "$@"; do
  ln -sf "$original_name" "$DESTDIR""$loader_dir"/"$loader_name"."$x"
done