Skip to content

Commit 864a4ad

Browse files
author
fabian
committed
Remove duplicate and trailing slashes from datadir variable
1 parent 633c7dd commit 864a4ad

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

configure.ac

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ no|yes)
5555
suffix=
5656
;;
5757
*)
58+
# Add leading dash
5859
suffix=-${suffix}
5960
;;
6061
esac
@@ -69,6 +70,9 @@ AC_ARG_ENABLE([datadir],
6970
[datadir="$enableval"],
7071
[datadir=no])
7172

73+
# Remove duplicate and trailing slashes
74+
datadir=`echo ${datadir} | tr -s '/' | sed 's|/*$||'`
75+
7276
case "$datadir" in
7377
no|yes)
7478
;;

0 commit comments

Comments
 (0)