add remote, when configure a new server

This commit is contained in:
Jakobus Schürz 2022-11-09 12:56:01 +01:00
parent c7437a4acf
commit 76634847f7

View file

@ -338,6 +338,7 @@ sshmyshellconfig() {
ENTRY ENTRY
[ -z "${MSC_SUBPATH+x}" ] && MSC_SUBPATH=".local/myshellconfig" [ -z "${MSC_SUBPATH+x}" ] && MSC_SUBPATH=".local/myshellconfig"
[ -z "${MSC_BASE+x}" ] && MSC_BASE="${HOME}/${MSC_SUBPATH}" [ -z "${MSC_BASE+x}" ] && MSC_BASE="${HOME}/${MSC_SUBPATH}"
#MSC_GIT_REMOTE_NAME=$($MSC_GIT rev-parse --abbrev-ref @{u} 2>/dev/null | cut -d'/' -f1)
MSC_BASE_PARENT="$(dirname $MSC_BASE)" MSC_BASE_PARENT="$(dirname $MSC_BASE)"
if [ $1 == "localhost" ]; then if [ $1 == "localhost" ]; then
@ -361,8 +362,8 @@ sshmyshellconfig() {
rm -rf ~/server-config && echo rm -rf ~/server-config rm -rf ~/server-config && echo rm -rf ~/server-config
echo mkdir -p ~/.local echo mkdir -p ~/.local
mkdir -p ~/.local mkdir -p ~/.local
echo git clone --recurse-submodules $MSC_GIT_REMOTE \${HOME}/${MSC_SUBPATH} echo git clone --recurse-submodules $(git remote get-url origin) \${HOME}/${MSC_SUBPATH}
git clone --recurse-submodules $MSC_GIT_REMOTE \${HOME}/${MSC_SUBPATH} git clone --recurse-submodules $(git remote get-url origin) \${HOME}/${MSC_SUBPATH}
date "+%s" > \${HOME}/${MSC_SUBPATH}/.last_update_submodules date "+%s" > \${HOME}/${MSC_SUBPATH}/.last_update_submodules
# date "+%s" > \${HOME}/${MSC_SUBPATH}/.last_update_repo # date "+%s" > \${HOME}/${MSC_SUBPATH}/.last_update_repo