dotfiles/main

27 lines
356 B
Text
Raw Normal View History

2024-06-04 01:33:44 +02:00
#!/bin/sh
. lib/crates.sh
cmd=$1
if [ -z "$cmd" ]; then
exit 1
else
shift
fi
case $cmd in
apply-crates) crate_apply $@ ;;
remove-crate)
if crate_removable $1; then
crate_remove $1
else
echo "crate can't be removed"
fi
;;
list-crates)
for c in ${@:-$(ls crates)}; do
crate_info $c
done
;;
esac