Fix loading Xsession scripts on FreeBSD: \+ sequence used in expr regexp is a GNU extension.

Use portable way of saying "one or more matches".
This commit is contained in:
Gleb Popov 2020-02-20 18:11:00 +04:00 committed by Pier Luigi Fiorini
parent cc625b996c
commit 8b6816a0f1

View File

@ -76,7 +76,7 @@ if [ -d "$xsessionddir" ]; then
for i in `ls $xsessionddir`; do
script="$xsessionddir/$i"
echo "Loading X session script $script"
if [ -r "$script" -a -f "$script" ] && expr "$i" : '^[[:alnum:]_-]\+$' > /dev/null; then
if [ -r "$script" -a -f "$script" ] && expr "$i" : '^[[:alnum:]_-]\{1,\}$' > /dev/null; then
. "$script"
fi
done