mirror of
https://gitlab.com/octtspacc/OcttKB
synced 2025-02-04 00:17:33 +01:00
25 lines
811 B
Plaintext
25 lines
811 B
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
ToLower(){
|
||
|
echo "$1" | tr "[:upper:]" "[:lower:]"
|
||
|
}
|
||
|
|
||
|
SetupGitProfile(){
|
||
|
git config --global user.email "$GitUserEmail"
|
||
|
git config --global user.name "$GitUserName"
|
||
|
git config --global credential.helper store
|
||
|
echo "https://$GitUserName:$GitPassword@gitlab.com" > ~/.git-credentials
|
||
|
}
|
||
|
|
||
|
TryCrossRepoSync(){
|
||
|
CommitCheck="$(git log -1 --pretty=%B | ToLower)"
|
||
|
CommitMsg0="$("OcttKB Cross-Repo Sync" | ToLower)"
|
||
|
[ "$CommitCheck" != "$CommitMsg0 (html to raw)" ] && \
|
||
|
[ "$CommitCheck" != "$CommitMsg0 (raw to html)" ] && \
|
||
|
[ "$CommitCheck" != "$CommitMsg0 (htm to raw)" ] && \
|
||
|
[ "$CommitCheck" != "$CommitMsg0 (raw to htm)" ] && \
|
||
|
[ "$CommitCheck" != "$CommitMsg0 (web to raw)" ] && \
|
||
|
[ "$CommitCheck" != "$CommitMsg0 (raw to web)" ] && \
|
||
|
sh ./GitLab.CrossRepoSync.sh || true
|
||
|
}
|