My scripts for startup, dmenu, and the command line
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

28 satır
746 B

  1. #!/bin/sh
  2. project="$HOME/projects/$2"
  3. watch() {
  4. npx browser-sync start --proxy "$2.test" -w --files $project/resources/views $project/resources/scss &
  5. pid=$!
  6. sass --load-path=sass --watch --error-css $project/resources/scss/main.scss $project/public/main.css &
  7. pid="$pid $!"
  8. trap "kill -TERM $pid" 0 1 2 15
  9. wait
  10. }
  11. once() {
  12. sass --load-path=sass $project/resources/scss/main.scss $project/public/main.css
  13. }
  14. deploy() {
  15. rsync -av --delete onyeka assets view files onyeka@onyeka.ca:~/site/
  16. }
  17. case $1 in
  18. 'watch') watch "$2" ;;
  19. 'transpile') transpile "$2" ;;
  20. 'deploy') deploy ;;
  21. 'build') deploy ;; #Should be a function that automatically git pull and builds important applications like stuff in projects/macros, dwm, plugins etc
  22. esac