diff --git a/symlinks/bin/aurfetch b/symlinks/bin/aurfetch index fc7b31d..2f49bb9 100755 --- a/symlinks/bin/aurfetch +++ b/symlinks/bin/aurfetch @@ -1,6 +1,8 @@ #!/bin/bash # Quick install flag +set -e + quick= while getopts q name diff --git a/symlinks/bin/mac-update b/symlinks/bin/mac-update deleted file mode 100755 index 5645ac1..0000000 --- a/symlinks/bin/mac-update +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -brew update -brew upgrade -brew upgrade --cask -if [ $? -eq 0 ]; then - echo $( date +%s ) > $MY_CONFIG_CACHE_DIR/brew-upgrade-date -fi diff --git a/symlinks/bin/print-last-brew-update b/symlinks/bin/print-last-brew-update deleted file mode 100755 index f46609e..0000000 --- a/symlinks/bin/print-last-brew-update +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -if [ ! -f $MY_CONFIG_CACHE_DIR/brew-upgrade-date ]; then - echo $( date +%s ) > $MY_CONFIG_CACHE_DIR/brew-upgrade-date -fi - -LAST_BREW_UPGRADE=$( cat $MY_CONFIG_CACHE_DIR/brew-upgrade-date ) - -print-system-upgrade-date $LAST_BREW_UPGRADE mac-update diff --git a/symlinks/bin/print-last-system-upgrade b/symlinks/bin/print-last-system-upgrade index 42f3bea..4bce1bb 100755 --- a/symlinks/bin/print-last-system-upgrade +++ b/symlinks/bin/print-last-system-upgrade @@ -1,7 +1,13 @@ #!/bin/bash if [ $MACHINE_TYPE == "mac" ]; then - print-last-brew-update + if [ ! -f $MY_CONFIG_CACHE_DIR/brew-upgrade-date ]; then + echo $( date +%s ) > $MY_CONFIG_CACHE_DIR/brew-upgrade-date + fi + + LAST_BREW_UPGRADE=$( cat $MY_CONFIG_CACHE_DIR/brew-upgrade-date ) + + print-system-upgrade-date $LAST_BREW_UPGRADE update-all-packages else if type pacman &> /dev/null then diff --git a/symlinks/bin/update-all-packages b/symlinks/bin/update-all-packages index 5769d35..6deed41 100755 --- a/symlinks/bin/update-all-packages +++ b/symlinks/bin/update-all-packages @@ -1,5 +1,9 @@ #!/bin/bash +set -e + +UNAME=$(sh -c 'uname 2>/dev/null || echo Unknown') + if type pacman > /dev/null 2>&1 then # Clear out orphans @@ -55,10 +59,39 @@ then fi # Update rubygems -gem update --system -gem update +if type gem > /dev/null 2>&1 +then + gem update --system + gem update +fi -vim +PlugUpdate +qall +if type nvim > /dev/null 2>&1 +then + nvim --headless -c 'autocmd User PackerComplete quitall' -c 'PackerSync' +fi + +if type -f vim > /dev/null 2>&1 +then + command vim +PlugUpdate +qall +fi + +if type asdf > /dev/null 2>&1 +then + asdf update + asdf plugin-update --all +fi + +if type brew > /dev/null 2>&1 +then + brew update + brew upgrade + if [ "$UNAME" = "Darwin" ]; then + brew upgrade --cask + fi + if [ $? -eq 0 ]; then + echo $( date +%s ) > $MY_CONFIG_CACHE_DIR/brew-upgrade-date + fi +fi if type pacman > /dev/null 2>&1 then diff --git a/symlinks/config/fish/completions/aurfetch.fish b/symlinks/config/fish/completions/aurfetch.fish new file mode 100644 index 0000000..d27334d --- /dev/null +++ b/symlinks/config/fish/completions/aurfetch.fish @@ -0,0 +1,6 @@ +function __fish-aurfetch-list-plugins + set -l search_string (commandline -t) + aursearch $search_string +end + +complete -c aurfetch -x -a '(__fish-aurfetch-list-plugins)' diff --git a/symlinks/config/fish/completions/clone-installation.fish b/symlinks/config/fish/completions/clone-installation.fish new file mode 100644 index 0000000..f4820f4 --- /dev/null +++ b/symlinks/config/fish/completions/clone-installation.fish @@ -0,0 +1 @@ +complete -c clone-installation -x -a '(__fish_complete_directories ~/.dotfiles/installed_packages/)' diff --git a/symlinks/profile.linux b/symlinks/profile.linux index 60b7d92..255dea9 100644 --- a/symlinks/profile.linux +++ b/symlinks/profile.linux @@ -2,7 +2,7 @@ source ~/.dotfiles/symlinks/profile.common export MACHINE_TYPE='linux' -export AUR_INSTALL_HOME=~/.aur +export AUR_INSTALL_HOME=~/.local/share/aurfetch export GRIM_DEFAULT_DIR=~/Pictures/Screenshots export PATH="$PATH:$HOME/Android/sdk/platform-tools/"