init: v2 of dot

This commit is contained in:
Strix 2024-06-04 01:33:44 +02:00
parent 0a8b09ca65
commit 7991035935
13 changed files with 156 additions and 12 deletions

26
main Executable file
View file

@ -0,0 +1,26 @@
#!/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