21 lines
698 B
Bash
21 lines
698 B
Bash
alias dir='ls -alF'
|
|
export EDITOR=nano
|
|
|
|
if [ ! -f "~/.config/setuser/setuser.sh" ]; then
|
|
mkdir -p .config
|
|
scp -q -r -o BatchMode=yes -o StrictHostKeyChecking=no l_samenv@linse-c:.config/setuser ~/.config/
|
|
fi
|
|
|
|
if [ -f ~/.config/setuser/setuser.sh ]; then
|
|
. ~/.config/setuser/setuser.sh
|
|
fi
|
|
|
|
function gitea_git() (
|
|
for repo in "$@"; do
|
|
cd ~/$repo
|
|
scp -q -r -o BatchMode=yes -o StrictHostKeyChecking=no l_samenv@linse-c:gitea/hooks .git/
|
|
grep -q 'https://gitea.psi.ch' .git/config || git remote set-url origin https://gitea.psi.ch/linse/${repo}.git
|
|
grep -q "$PWD/.git/hooks/get_gitea_token" .git/config || git config credential.helper "$PWD/.git/hooks/get_gitea_token"
|
|
done
|
|
)
|