better updater
This commit is contained in:
parent
cbb978568b
commit
e5df0b93cc
3 changed files with 12 additions and 5 deletions
|
@ -84,6 +84,7 @@
|
|||
};
|
||||
splitjoin.enable = true;
|
||||
surround.enable = true;
|
||||
tabline.enable = true;
|
||||
};
|
||||
nvim-cmp = {
|
||||
enable = true;
|
||||
|
|
|
@ -1,10 +1,16 @@
|
|||
#!/bin/bash
|
||||
|
||||
do_devenv() {
|
||||
pushd ~/.dotfiles || return
|
||||
printf "Updating \033[38;5;87mdevenv\033[0m \n"
|
||||
nix flake update
|
||||
popd || return
|
||||
}
|
||||
|
||||
do_topgrade() {
|
||||
topgrade
|
||||
}
|
||||
|
||||
update_home_manager() {
|
||||
pushd ./home-manager || return
|
||||
printf "Updating \033[38;5;87mhome-manager\033[0m\n"
|
||||
|
@ -21,7 +27,7 @@ apply_home_manager() {
|
|||
popd || return
|
||||
}
|
||||
|
||||
while getopts ':dha' opt; do
|
||||
while getopts ':dhat' opt; do
|
||||
case $opt in
|
||||
a)
|
||||
apply_home_manager
|
||||
|
@ -33,8 +39,11 @@ while getopts ':dha' opt; do
|
|||
update_home_manager
|
||||
apply_home_manager
|
||||
;;
|
||||
t)
|
||||
do_topgrade
|
||||
;;
|
||||
?)
|
||||
echo "Ignoring unknown option. Please only pass -a, -d, or -h"
|
||||
echo "Ignoring unknown option. Please only pass -a, -d, -h, or -t"
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
function update_me {
|
||||
pushd ~
|
||||
if [[ ! ( "$@" =~ -n ) ]]; then
|
||||
topgrade
|
||||
fi
|
||||
pushd ~/.dotfiles/nix
|
||||
./update.sh $@
|
||||
popd
|
||||
|
|
Loading…
Add table
Reference in a new issue