init: v2 of dot
This commit is contained in:
parent
0a8b09ca65
commit
7991035935
13 changed files with 156 additions and 12 deletions
26
main
Executable file
26
main
Executable 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
|
Loading…
Add table
Add a link
Reference in a new issue