Advertisement
Un1XX388

Test for #353

Apr 17th, 2024
634
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.98 KB | Source Code | 0 0
  1. #!/bin/sh
  2.  
  3. set -e
  4. set -u
  5.  
  6. TMP_DIR="$(mktemp --directory --suffix .vit)"
  7. VIT_DIR="$TMP_DIR/vit"
  8. TASK_DIR="$TMP_DIR/task"
  9. TASKRC="$TMP_DIR/taskrc"
  10.  
  11. echo "
  12. This script will create a dummy TaskWarrior database and VIT configuration.
  13. "
  14. read -p "Press enter to continue... " DUMMY
  15.  
  16. echo "Creating dummy task configuration..."
  17. mkdir "$TASK_DIR"
  18. cat > "$TASKRC" <<EOT
  19. data.location=$TASK_DIR
  20. EOT
  21. export TASKRC
  22.  
  23. echo "Creating dummy VIT configuration..."
  24. mkdir "$VIT_DIR"
  25. touch "$VIT_DIR/config.ini"
  26.  
  27. echo "Adding some dummy tasks..."
  28. task add a
  29. task add b
  30. task a modify +aa
  31. task a modify +zz
  32. task b modify +zz
  33.  
  34. echo "Complete!
  35.  
  36. Copy and paste the following two export statements into your current
  37. shell session to activate the dummy installation.
  38.  
  39. export TASKRC=${TASKRC}
  40. export VIT_DIR=${VIT_DIR}
  41.  
  42. When complete, you can simply exit the current shell session, or copy and paste
  43. the following 'unset' commands to revert the current shell session to the
  44. TaskWarrior/VIT defaults.
  45.  
  46. unset TASKRC
  47. unset VIT_DIR
  48. "
  49.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement