diff --git a/scripts/Common/Config/bash/profile.sh b/scripts/Common/Config/bash/profile.sh index d0812dd48..7427debfd 100755 --- a/scripts/Common/Config/bash/profile.sh +++ b/scripts/Common/Config/bash/profile.sh @@ -5,7 +5,7 @@ pushd "${BASH_SOURCE%/*}" > /dev/null; function addBashProfile() { name="$1"; title="$2"; - addProfileStatement "$name" "$title" "/bin/bash" "/etc/bash/conf.d" "${@:3}"; + addProfileStatement "$name" "$title" "/bin/bash" "sh" "/etc/bash/conf.d" "${@:3}"; } popd > /dev/null; diff --git a/scripts/Common/Config/fish/profile.sh b/scripts/Common/Config/fish/profile.sh index bcbaf9eae..6730c866c 100755 --- a/scripts/Common/Config/fish/profile.sh +++ b/scripts/Common/Config/fish/profile.sh @@ -5,7 +5,7 @@ pushd "${BASH_SOURCE%/*}" > /dev/null; function addFishProfile() { name="$1"; title="$2"; - addProfileStatement "$name" "$title" "/bin/fish" "/etc/fish/conf.d" "${@:3}"; + addProfileStatement "$name" "$title" "/bin/fish" "fish" "/etc/fish/conf.d" "${@:3}"; } popd > /dev/null; diff --git a/scripts/Common/Scripts/profile-base.sh b/scripts/Common/Scripts/profile-base.sh index f210397e4..41f7862f1 100755 --- a/scripts/Common/Scripts/profile-base.sh +++ b/scripts/Common/Scripts/profile-base.sh @@ -2,11 +2,12 @@ function addProfileStatement() { name="$1"; title="$2"; shellBin="$3"; - profileRoot="$4"; + extension="$4"; + profileRoot="$5"; - if [ ! -z "${@:5}" ] + if [ ! -z "${@:6}" ] then - statement="${@:5}"; + statement="${@:6}"; else statement="$(cat)"; fi; @@ -18,9 +19,9 @@ function addProfileStatement() { echo '#!'"$shellBin"; echo "# $title"; echo "$statement"; - } > "profile.sh"; + } > "profile.$extension"; - sudo install -Dm755 profile.sh "$profileRoot/$name.sh" + sudo install -Dm755 profile.$extension "$profileRoot/$name.$extension" popd > /dev/null; rm -rf "$contextRoot";