blob: 2f30607fd6f449ad6a73f3b536b8108dd3e61b4b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#!/usr/bin/env bash
# Usage: recit add-project -n my-project
# Summary: Add Project
# shellcheck source=/dev/null
source lib/loader
recfile=$(load_recit)
name=""
while getopts "n:" options; do
case "${options}" in
n)
name=${OPTARG}
;;
:)
echo "Error: -${OPTARG} requires an argument."
exit 1
;;
*)
exit 1
;;
esac
done
fmt_date=$(date '+%Y-%m-%d %r')
recins --verbose -f Id -v "$name" -f Status -v "open" -f Created -v "$fmt_date" -t Project "${recfile}"
|