fix: add package script to check for empty string
This commit is contained in:
@ -1,6 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
cd ~/Code/dotfiles
|
||||
|
||||
if [ -z $@ ]; then
|
||||
echo "You must provide a package name."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "metapac add --backend arch --package $@"
|
||||
metapac add --backend arch --package $@
|
||||
|
||||
@ -8,6 +13,8 @@ rsync -av ~/.config/metapac .config --delete
|
||||
|
||||
metapac sync
|
||||
|
||||
echo "Adding package to git..."
|
||||
|
||||
git add .config/metapac
|
||||
git commit -m "add-package: $@"
|
||||
git push
|
||||
|
Reference in New Issue
Block a user