changed bash to sh

This commit is contained in:
mrfry 2023-04-11 20:07:22 +02:00
parent 496ae1c28f
commit 0421353d68
5 changed files with 10 additions and 51 deletions

View file

@ -1,11 +1,11 @@
#!/bin/bash
#!/bin/sh
gitDir=".git"
gitmoduleFile=".gitmodules"
sshGitmodulesFile=".gitmodules.ssh"
httpsGitmodulesFile=".gitmodules.https"
function error() { echo -e "\033[0;41m${1}\033[0m"; exit 1; }
error() { printf "\033[0;41m%s\033[0m" "${1}"; exit 1; }
if [ ! -d "${gitDir}" ]; then
error "${gitDir} does not exist! Maybe you ran this script in the wrong directory"
@ -15,8 +15,8 @@ if [ "$1" != "ssh" ] && [ "$1" != "https" ]; then
error "Invalid param! Valid params are: 'ssh', 'https'"
fi
if [ "$1" == "ssh" ]; then
if [ "$1" = "ssh" ]; then
cp -v "$sshGitmodulesFile" "$gitmoduleFile"
elif [ "$1" == "https" ]; then
elif [ "$1" = "https" ]; then
cp -v "$httpsGitmodulesFile" "$gitmoduleFile"
fi