Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configure.ac: fix bad substitutions with dash #813

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ bash_path="$withval"
# bash v4. SpaceFM runs bash as root and you WILL open root exploits if you
# disable this check, or run bash based on $PATH.
if test ! -z "$bash_path"; then
if test ! "${bash_path:0:1}" = "/"; then
if test "${bash_path%"${bash_path#?}"}" != "/"; then
AC_MSG_ERROR([Fatal Error: Option --with-bash-path requires absolute path.])
fi
echo "Modifying spacefm-auth to use bash path..."
bash_esc="${bash_path//\//\\/}"
bash_esc="$(printf %s "$bash_path" | sed "s|/|\\\/|g")"
sed "s/\(\/bin\/bash\)/$bash_esc/" src/spacefm-auth.bash > src/spacefm-auth
else
cp -pf src/spacefm-auth.bash src/spacefm-auth
Expand Down Expand Up @@ -308,12 +308,12 @@ data/Makefile
])

resolve_datadir="$(eval echo "$datadir")"
while [[ "${resolve_datadir:0:1}" == "$" ]]; do
while test "${resolve_datadir%"${resolve_datadir#?}"}" = "\$"; do
resolve_datadir="$(eval echo "$resolve_datadir")"
done

resolve_htmldir="$(eval echo "$htmldir")"
while [[ "${resolve_htmldir:0:1}" == "$" ]]; do
while test "${resolve_htmldir%"${resolve_htmldir#?}"}" = "\$"; do
resolve_htmldir="$(eval echo "$resolve_htmldir")"
done

Expand Down