| t@@ -6,7 +6,7 @@
hooks="hook"
davfile="davpasswd"
-
+ttab="ttab"
system=`uname -o`
gendav() {
t@@ -18,7 +18,7 @@ gendav() {
elif [[ $system == "Darwin" ]]; then
daventry=`echo -n "${undertaker}:WebDAV:" \
&& echo -n "${undertaker}:WebDAV:${davpass}" \
- | md5 \
+ | md5 \
| awk '{print $NF}'`
fi
}
t@@ -126,6 +126,19 @@ happenz() {
4)
echo -e "\n"
echo "Toggling state..."
+
+ read -p "Please input the name of the tomb you wish to toggle: "
+ re='^[A-Za-z0-9]+$'
+ [[ $tombname =~ $re ]] || {
+ echo "ERROR: Invalid characters in tomb name."
+ exec $0
+ }
+ [[ `grep $tombname $ttab` ]] || {
+ echo "ERROR: No tomb of that name."
+ exec $0
+ }
+
+ # TODO: make pattern recognition, sed or awk
;;
*)
echo -e "\n" |