Updated nixos update; modified run to only include .sh files
This commit is contained in:
@@ -5,7 +5,7 @@ SCRIPT_DIR="$(dirname $(realpath "$0"))"
|
|||||||
function run() {
|
function run() {
|
||||||
if [ $# -lt 2 ]; then
|
if [ $# -lt 2 ]; then
|
||||||
echo "Usage: $0 <category> <script> [args...]"
|
echo "Usage: $0 <category> <script> [args...]"
|
||||||
find "$SCRIPT_DIR" -mindepth 2 | awk -F'[./]' '{printf "$ run %s %s\n",$(NF-2),$(NF-1)}'
|
find "$SCRIPT_DIR" -mindepth 2 -iname "*.sh" | awk -F'[./]' '{printf "$ run %s %s\n",$(NF-2),$(NF-1)}'
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
bash "$SCRIPT_DIR/$1/$2.sh" ${@:3}
|
bash "$SCRIPT_DIR/$1/$2.sh" ${@:3}
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
update() {
|
update() {
|
||||||
cd ~/dotfiles
|
cd ~/dotfiles
|
||||||
git pull
|
git pull
|
||||||
|
git submodule init
|
||||||
git submodule update
|
git submodule update
|
||||||
sudo nixos-rebuild switch --flake ~/dotfiles
|
sudo nixos-rebuild switch --flake ~/dotfiles
|
||||||
home-manager switch --flake ~/dotfiles
|
home-manager switch --flake ~/dotfiles
|
||||||
|
|||||||
Reference in New Issue
Block a user