Update... update.sh 🤣

This commit is contained in:
Anthony Cicchetti 2024-01-29 09:10:21 -05:00
parent 5597e531e1
commit 9cf62dc8aa
2 changed files with 13 additions and 8 deletions

10
flake.lock generated
View file

@ -167,12 +167,12 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1705856552,
"narHash": "sha256-JXfnuEf5Yd6bhMs/uvM67/joxYKoysyE3M2k6T3eWbg=",
"rev": "612f97239e2cc474c13c9dafa0df378058c5ad8d",
"revCount": 574351,
"lastModified": 1706191920,
"narHash": "sha256-eLihrZAPZX0R6RyM5fYAWeKVNuQPYjAkCUBr+JNvtdE=",
"rev": "ae5c332cbb5827f6b1f02572496b141021de335f",
"revCount": 576254,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.574351%2Brev-612f97239e2cc474c13c9dafa0df378058c5ad8d/018d3085-aff0-7a0b-ab80-1a9c414de8cd/source.tar.gz"
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.576254%2Brev-ae5c332cbb5827f6b1f02572496b141021de335f/018d4821-953a-717b-b0f9-5a5ba6f94933/source.tar.gz"
},
"original": {
"type": "tarball",

View file

@ -22,21 +22,26 @@ apply_home_manager() {
}
OPTIND=1
while getopts dha opt; do
while getopts ':dha' opt; do
case $opt in
a)
apply_home_manager
exit
;;
d)
do_devenv
exit
;;
h)
update_home_manager
apply_home_manager
exit
;;
*)
"Ignoring unknown option. Please only pass -a, -d, or -h"
?)
echo "Ignoring unknown option. Please only pass -a, -d, or -h"
;;
esac
done
shift "$((OPTIND - 1))"
# Fallthrough event
echo "No argument provided. Please pass -a, -d, or -h"