Compare commits

...

10 commits

Author SHA1 Message Date
Jakobus Schürz
7f747743c6 remove BASH in sudo 2023-01-20 09:56:04 +01:00
Jakobus Schürz
e3b72eb975 add SSH_CONNECTION to greet-string 2023-01-20 09:54:35 +01:00
Jakobus Schürz
13bf8e8458 make setgitremote configurable with defaults too 2023-01-19 10:09:36 +01:00
Jakobus Schürz
d96652835b unset BASH for sudo until better solution
function sudo needs parsing
2023-01-19 09:16:58 +01:00
Jakobus Schürz
3fea151851 set default branch for init as master 2023-01-19 09:16:44 +01:00
Jakobus Schürz
45bea66688 Merge branch 'master' of https://git.schuerz.at/jakob/myshellconfig 2023-01-11 16:55:44 +01:00
Jakobus Schürz
00b53afabb comment create symlink 2023-01-09 08:21:39 +01:00
Jakobus Schürz
5a89e94ccc update submodules 2023-01-09 08:21:39 +01:00
Jakobus Schürz
3651670d0c change default values 2023-01-09 08:21:39 +01:00
Jakobus Schürz
b823bcd76f update submodules 2023-01-09 08:21:39 +01:00
11 changed files with 39 additions and 14 deletions

View file

@ -48,3 +48,5 @@
submodulesummary = 1
[pull]
rebase = true
[init]
defaultBranch = master

View file

@ -214,7 +214,7 @@ EOF
if ${STARTTMUX-$STARTTMUXDEFAULT} ; then
cat << EOF
"User: $USER - $UID"
"User: $USER - $UID - $SSH_CONNECTION"
Starting or resuming screen session
Press CTRL+C to cancel screen startup

View file

@ -1,14 +1,17 @@
### GIT ####
export MSC_GIT_ALL_LOCAL=true
export MSC_GIT_REPO_UPDATE_DEFAULT=true
export MSC_GIT_REPO_UPDATE_INTERVALL_DEFAULT=48 #intervall in hours
export MSC_GIT_REMOTE_NAME_DEFAULT=gitea
export MSC_GIT_BRANCH_DEFAULT=master
export MSC_GIT_SUBMODULES_UPDATE_DEFAULT=true
export MSC_GIT_SUBMODULES_UPDATE_INTERVALL_DEFAULT=196 #intervall in hours
export MSC_GIT_SUBMODULES_SERVER_DEFAULT="git://github.com/"
export MSC_GIT_CHECKOUTSCRIPT_OPTIONS_DEFAULT="-h"
export MSC_GIT_TIMEOUT_DEFAULT=5s
export MSC_GIT_CHECKOUT_TIMEOUT_DEFAULT=20s
export MSC_GIT_REMOTE_NAME_DEFAULT=gitea
export MSC_GIT_BRANCH_DEFAULT=master
export MSC_GIT_PULLURL_DEFAULT=https://git.schuerz.at/jakob/myshellconfig.git
export MSC_GIT_PUSHURL_DEFAULT=git@git.schuerz.at:jakob/myshellconfig.git
### LOGGING ###
# Possible loglevel-values: ERROR, WARN, INFO, DEBUG, TRACE
export MSC_LOGLEVEL_DEFAULT="WARN"

View file

@ -1,4 +1,5 @@
### GIT ####
export MSC_GIT_ALL_LOCAL=false
export MSC_GIT_REPO_UPDATE_DEFAULT=true
export MSC_GIT_REPO_UPDATE_INTERVALL_DEFAULT=48 #intervall in hours
export MSC_GIT_SUBMODULES_UPDATE_DEFAULT=true
@ -7,6 +8,10 @@ export MSC_GIT_SUBMODULES_SERVER_DEFAULT="git://github.com/"
export MSC_GIT_CHECKOUTSCRIPT_OPTIONS_DEFAULT="-h"
export MSC_GIT_TIMEOUT_DEFAULT=5s
export MSC_GIT_CHECKOUT_TIMEOUT_DEFAULT=20s
export MSC_GIT_REMOTE_NAME_DEFAULT=gitea
export MSC_GIT_BRANCH_DEFAULT=master
export MSC_GIT_PULLURL_DEFAULT=https://git.schuerz.at/jakob/myshellconfig.git
export MSC_GIT_PUSHURL_DEFAULT=git@git.schuerz.at:jakob/myshellconfig.git
### LOGGING ###
# Possible loglevel-values: ERROR, WARN, INFO, DEBUG, TRACE
export MSC_LOGLEVEL_DEFAULT="INFO"

View file

@ -63,10 +63,11 @@ function sudo() {
logdebug "\$1: $1"
[ -e "$(which $1 2>/dev/null)" ] && C="x"
logdebug "C: $C"
[ getbashrcfile ] && BASH="bash --rcfile $(getbashrcfile) ${C:+-c}" || unset BASH
[ getbashrcfile ] && BASH="bash --rcfile $(getbashrcfile)" || unset BASH
logdebug "BASH1: $BASH"
[ -z "${C:-x}" ] && unset BASH
logdebug "BASH2: $BASH"
unset BASH
else
logdebug "NO Tempconfig"
unset BASH
@ -1337,11 +1338,24 @@ setserver() {
setgitremote() {
cd ~/.local/myshellconfig
git checkout master
git remote set-url origin https://git.schuerz.at/jakob/myshellconfig.git
git remote set-url origin --push git@git.schuerz.at:jakob/myshellconfig.git
loginfo "new remote set to"
git remote -v
git remote get-url ${MSC_GIT_REMOTE_NAME:-$MSC_GIT_REMOTE_NAME_DEFAULT} >/dev/null 2>&1
case $? in
2)
git remote add ${MSC_GIT_REMOTE_NAME:-$MSC_GIT_REMOTE_NAME_DEFAULT} ${MSC_GIT_PULLURL:-$MSC_GIT_PULLURL_DEFAULT}
git fetch ${MSC_GIT_REMOTE_NAME:-$MSC_GIT_REMOTE_NAME_DEFAULT}
;;
*)
echo "no error getting remote url"
;;
esac
git remote set-url ${MSC_GIT_REMOTE_NAME:-$MSC_GIT_REMOTE_NAME_DEFAULT} ${MSC_GIT_PULLURL:-$MSC_GIT_PULLURL_DEFAULT}
git remote set-url --push ${MSC_GIT_REMOTE_NAME:-$MSC_GIT_REMOTE_NAME_DEFAULT} ${MSC_GIT_PUSHURL:-$MSC_GIT_PUSHURL_DEFAULT}
git branch -u "${MSC_GIT_REMOTE_NAME:-$MSC_GIT_REMOTE_NAME_DEFAULT}"/"${MSC_GIT_BRANCH:-$MSC_GIT_BRANCH_DEFAULT}"
git checkout ${MSC_GIT_BRANCH:-$MSC_GIT_BRANCH_DEFAULT}
loginfo "now remotes are: $(git remote -v)"
loginfo "new upstream set to: $(git branch -vv)"
git fetch -p
git merge FETCH_HEAD
git submodule sync

View file

@ -19,6 +19,7 @@ if [ -n "$SSH_AUTH_SOCK" ] && \
#rm ~/.x2go/agentsocket
#ln -s $SSH_AUTH_SOCK ~/.x2go/agentsocket
loginfo "write SSH_AUTH_SOCK (${SSH_AUTH_SOCK}) to ~/.x2go/agentsocket"
# ln -s $(echo $SSH_AUTH_SOCK) ~/.ssh/agents/socket-bmi-desktopschuer4
fi
# Part that runs in X2Go session

@ -1 +1 @@
Subproject commit e91b178ff832b7bcbbf4d99d9f467f63fd1b76b5
Subproject commit 25cb91f42d020f675bb0a2ce3fbd3a5d96119efa

@ -1 +1 @@
Subproject commit 1b1b8098419daacb92ca401ad6ee0ca6894a40ca
Subproject commit 7c59902f64dcd7ea356e891274b21144d1ea5948

@ -1 +1 @@
Subproject commit f931e538903a20d7a63162f0f10f58447f1117c8
Subproject commit dad26d81dfb7393388ec31b6a4b921c4d722a95a

@ -1 +1 @@
Subproject commit a71f9a6417fd3dc9fd4f0a5228528ec3260dc201
Subproject commit 0ed7b8bb2ed68d65a5ba55317896680b31d315b0

@ -1 +1 @@
Subproject commit 55bad92d246a31e3425dfaf16b7eec657eab1fad
Subproject commit cc5d3490c8f4c87d29d97df414941a9df8ceb390