summaryrefslogblamecommitdiffstats
path: root/roles/prerec/templates/talk
blob: fa2e5f032bebd5272bf16d6c559d86d6a0f14a21 (plain) (tree)
1
2
3
4
5
6
7
8
9
10

                       

                                                    
 


                

                                                               



                                 
                              

                           
                         
                                                                                                                                                                   


                                                                                      
 
#!/bin/bash
# {{ ansible_managed }}
# How to use: talk slug from-status-regexp to-status
# or talk slug to-status

SLUG="$1"
FROM_STATUS="$2"
TO_STATUS="$3"
XDG_RUNTIME_DIR=/run/user/{{ getent_passwd[emacsconf_user].1 }}

if [ "x$TO_STATUS" == "x" ]; then
    FROM_STATUS=.
    TO_STATUS="$2"
fi
cd {{ emacsconf_private_dir }}
#echo "Pulling conf.org..."
#git pull
echo "Updating status..."
XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR emacsclient --eval "(emacsconf-with-todo-hooks (emacsconf-update-talk-status \"$SLUG\" \"$FROM_STATUS\" \"$TO_STATUS\"))" -a emacs
#echo "Committing and pushing in the background"
#git commit -m "Update task status for $SLUG from $FROM_STATUS to $TO_STATUS" conf.org
#git push &