aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure11
1 files changed, 11 insertions, 0 deletions
diff --git a/configure b/configure
index 03b20d7..3f9aa77 100755
--- a/configure
+++ b/configure
@@ -31,6 +31,12 @@ assign_toggle() {
eval "$1=$2"
}
+add_trailing_slash() {
+ set -- "$1" "$(printf "%s" "$1" | tail -c 1)"
+ if [ "$2" = "/" ]; then echo "$1";
+ else echo "$1/"; fi
+}
+
# Option parsing
for option do
case $option in
@@ -74,6 +80,11 @@ exit 1
if [ -n "$display_help" ]; then show_help; fi
+# Add trailing slash if needed
+if [ -n "$source_path" ]; then
+ source_path=$(add_trailing_slash "$source_path")
+fi
+
# Detect OS and platform, because it wasn't specified
os="Unknown"
if [ -z "$platform" ]; then