chore(global): merge branch 'main' of remote into main
Signed-off-by: Andrei Jiroh Eugenio Halili <andreijiroh@madebythepins.tk>
This commit is contained in:
commit
69e8ca2369
|
@ -11,11 +11,11 @@ working at The Pins Team, see [our dotfiles][df-gl].
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
## configure required variables
|
## configure required variables
|
||||||
export GITLAB_LOGIN=AndreiJirohHaliliDev2006
|
export GITLAB_LOGIN=ajhalili2006
|
||||||
export GITLAB_TOKEN=<my-gitlab1dotcom-PAT>
|
export GITLAB_TOKEN=<my-gitlab1dotcom-PAT>
|
||||||
|
|
||||||
## Run the bootstrap script
|
## Run the bootstrap script
|
||||||
$(command -v curl>>/dev/null && echo curl -o- || echo wget -q0-) https://raw.githubusercontent.com/AndreiJirohHaliliDev2006/dotfiles/main/bootstrap | bash -
|
$(command -v curl>>/dev/null && echo curl -o- || echo wget -q0-) https://raw.githubusercontent.com/ajhalili2006/dotfiles/main/bootstrap | bash -
|
||||||
|
|
||||||
## Done?
|
## Done?
|
||||||
unset GITLAB_TOKEN GITLAB_LOGIN
|
unset GITLAB_TOKEN GITLAB_LOGIN
|
||||||
|
@ -25,7 +25,7 @@ unset GITLAB_TOKEN GITLAB_LOGIN
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# assuming git is installed
|
# assuming git is installed
|
||||||
git clone https://github.com/AndreiJirohHaliliDev2006/dotfiles $HOME/.dotfiles
|
git clone https://github.com/ajhalili2006/dotfiles $HOME/.dotfiles
|
||||||
cd $HOME/.dotfiles
|
cd $HOME/.dotfiles
|
||||||
|
|
||||||
# no need for exporting my PAT before running this
|
# no need for exporting my PAT before running this
|
||||||
|
|
|
@ -83,7 +83,7 @@ installDeps() {
|
||||||
cloneRepo() {
|
cloneRepo() {
|
||||||
if [ ! -d "$HOME/.dotfiles" ]; then
|
if [ ! -d "$HOME/.dotfiles" ]; then
|
||||||
echoStageName "Cloning the dotfiles repo"
|
echoStageName "Cloning the dotfiles repo"
|
||||||
git clone https://github.com/AndreiJirohHaliliDev2006/dotfiles.git $HOME/.dotfiles
|
git clone https://github.com/ajhalili2006/dotfiles.git $HOME/.dotfiles
|
||||||
else
|
else
|
||||||
echoStageName "Dotfiles repo found, pulling remote changes instead"
|
echoStageName "Dotfiles repo found, pulling remote changes instead"
|
||||||
git -C "$HOME/.dotfiles" fetch --all
|
git -C "$HOME/.dotfiles" fetch --all
|
||||||
|
@ -94,15 +94,15 @@ cloneRepo() {
|
||||||
if [[ $GITLAB_TOKEN == "" ]] && [[ $GITLAB_LOGIN == "" ]] && [ ! -d "$HOME/.dotfiles/secrets" ]; then
|
if [[ $GITLAB_TOKEN == "" ]] && [[ $GITLAB_LOGIN == "" ]] && [ ! -d "$HOME/.dotfiles/secrets" ]; then
|
||||||
error "GitLab login and token can't be blank!" && exit 1
|
error "GitLab login and token can't be blank!" && exit 1
|
||||||
# Probably change my GitLab SaaS username with yours
|
# Probably change my GitLab SaaS username with yours
|
||||||
elif [[ $GITLAB_LOGIN != "AndreiJirohHaliliDev2006" ]] && [ ! -d "$HOME/.dotfiles/secrets" ]; then
|
elif [[ $GITLAB_LOGIN != "ajhalili2006" ]]; then
|
||||||
error "Only Andrei Jiroh can do this!" && exit 1
|
error "Only Andrei Jiroh can do this!" && exit 1
|
||||||
elif [[ $GITLAB_LOGIN == "AndreiJirohHaliliDev2006" ]] && [[ $GITLAB_TOKEN == "" ]] && [ ! -d "$HOME/.dotfiles/secrets" ]; then
|
elif [[ $GITLAB_LOGIN == "ajhalili2006" ]] && [[ $GITLAB_TOKEN == "" ]]; then
|
||||||
error "Missing GitLab SaaS PAT! Check your Bitwarden vault for that key." && exit 1
|
error "Missing GitLab SaaS PAT! Check your Bitwarden vault for that key." && exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -d "$HOME/.dotfiles/secrets" ]; then
|
if [ ! -d "$HOME/.dotfiles/secrets" ]; then
|
||||||
echoStageName "Cloning secrets repo"
|
echoStageName "Cloning secrets repo"
|
||||||
git clone https://$GITLAB_LOGIN:$GITLAB_TOKEN@gitlab.com/AndreiJirohHaliliDev2006/dotfiles-secrets $HOME/.dotfiles/secrets
|
git clone https://$GITLAB_LOGIN:$GITLAB_TOKEN@gitlab.com/ajhalili2006/dotfiles-secrets $HOME/.dotfiles/secrets
|
||||||
[ $? != "0" ] && echo "error: That kinda sus, but either only Andrei Jiroh can proceed or maybe the PAT you used is invalid." && exit 1
|
[ $? != "0" ] && echo "error: That kinda sus, but either only Andrei Jiroh can proceed or maybe the PAT you used is invalid." && exit 1
|
||||||
chmod 600 $HOME/.dotfiles/secrets/{ssh,pgp}
|
chmod 600 $HOME/.dotfiles/secrets/{ssh,pgp}
|
||||||
sleep 5
|
sleep 5
|
||||||
|
|
Loading…
Reference in New Issue