chore(bootstrap): quick fix on failed part when success

Signed-off-by: Andrei Jiroh Eugenio Halili <andreijiroh@madebythepins.tk>
This commit is contained in:
Andrei Jiroh Eugenio Halili 2021-06-21 16:13:33 +08:00 committed by GitHub
parent bb636bbc94
commit 3e2241a525
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -95,7 +95,7 @@ cloneRepo() {
if [ ! -d "$HOME/.dotfiles/secrets" ]; then
echoStageName "Cloning secrets repo"
git clone https://$GITLAB_LOGIN:$GITLAB_TOKEN@gitlab.com/AndreiJirohHaliliDev2006/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}
sleep 5
else
@ -149,7 +149,7 @@ copyBashrc() {
if [[ $DOTFILES_OS_NAME == "android-termux" ]]; then
ln -s $HOME/.dotfiles/termux.gitconfig ~/.gitconfig
elif [[ $DOTFILES_OS_NAME == "debian-ubuntu" ]]; then
if [[ $SKIP_BASHRC_LINKING == "" ]] && [ ! -f "$HOME/.bashrc" ]; then
if [[ $SKIP_CONFIG_LINKING == "" ]] && [ ! -f "$HOME/.bashrc" ]; then
ln -s "$HOME/.dotfiles/ubuntu.bashrc" ~/.bashrc
elif [[ $SKIP_CONFIG_LINKING == "" ]] && [ -f "$HOME/.bashrc" ]; then
mv ~/.bashrc ~/.bashrc.bak
@ -160,11 +160,11 @@ copyBashrc() {
copyGitConfig() {
echoStageName "Symlinking Git config"
if [[ $DOTFILES_OS_NAME == "android-termux" ]]; then
if [[ $DOTFILES_OS_NAME == "android-termux" ]] && [[ $SKIP_CONFIG_LINKING == "" ]]; then
[ ! -f "$HOME/.ssh/config" ] && ln -s $HOME/.dotfiles/gitconfig/termux ~/.gitconfig || warn "Git configuration on userspace found, please merge them manually!"
# TODO: Write checks if it's Ubuntu or Debian
# See https://superuser.com/a/741610/1124908 for details
elif [[ $DOTFILES_OS_NAME == "debian-ubuntu" ]]; then
elif [[ $DOTFILES_OS_NAME == "debian-ubuntu" ]] && [[ $SKIP_CONFIG_LINKING == "" ]]; then
[ ! -f "$HOME/.ssh/config" ] && ln -s $HOME/.dotfiles/linux/ubuntu ~/.gitconfig || warn "Git configuration on userspace found, please merge them manually!"
fi
}