auto_rice script fix
This commit is contained in:
parent
da9e214ddd
commit
1dfb53cc00
2 changed files with 14 additions and 7 deletions
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/zsh
|
||||
|
||||
source /opt/miniconda3/etc/profile.d/conda.sh
|
||||
# source /opt/miniconda3/etc/profile.d/conda.sh
|
||||
|
||||
export BROWSER='firefox'
|
||||
export EDITOR='nvim'
|
||||
|
|
|
|||
|
|
@ -18,17 +18,24 @@ alias config="git --git-dir $location --work-tree=$HOME"
|
|||
config config status.showUntrackedFiles no
|
||||
|
||||
# Checkout branch, but move collisions to ~/.config-backup
|
||||
mkdir -p "$HOME/.config-backup"
|
||||
config checkout 2>&1 \
|
||||
if [ ! -e "$location/checked" ]; then
|
||||
mkdir -p "$HOME/.config-backup"
|
||||
config checkout 2>&1 \
|
||||
| egrep "\s+\." | awk {'print $1'} \
|
||||
| xargs -I {} mv {} "$HOME/.config-backup/"{}
|
||||
|
||||
# Fix unsafe permissions on gnupg directory
|
||||
chmod 700 "$HOME/.local/share/gnupg/"
|
||||
# Fix unsafe permissions on gnupg directory
|
||||
chmod 700 "$HOME/.local/share/gnupg/"
|
||||
|
||||
# Empty file, indicating the repo has been checked out once
|
||||
touch "$location/checked"
|
||||
fi
|
||||
|
||||
config submodule init
|
||||
config submodule update --force --recursive --init --remote
|
||||
config submodule foreach "git checkout master"
|
||||
|
||||
cd $HOME
|
||||
|
||||
exec zsh
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue