show-vine-default.sh 763 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/bin/bash
  2. if [ $# -ne 1 ]; then
  3. cat<<EOF
  4. Usage: $(basename $0) <version>
  5. EOF
  6. exit 1
  7. fi
  8. VERSION=$1
  9. if [ $(egrep -m 1 $VERSION /var/lib/emacsen-common/installed-flavors) ]; then
  10. FLAVOR=$(egrep -m 1 $VERSION /var/lib/emacsen-common/installed-flavors)
  11. else
  12. exit 1
  13. fi
  14. [ -d /etc/${FLAVOR} ] || exit 1
  15. ORDER="base faces"
  16. ORDER="${ORDER} $(ls /etc/${FLAVOR}/site-start.d/*-init.el | \
  17. sed -e "s!.*/[0-9]*\(.*\)-init\.el!\1!g")"
  18. LIST="$(find /usr/share/${FLAVOR}/site-lisp/ \
  19. -regex '.*/vine-default.*\.el')"
  20. for pkg in $ORDER; do
  21. ELS=$(echo "$LIST" | egrep -e "/${pkg}")
  22. if [ ! -z "${ELS}" ]; then
  23. for el in ${ELS}; do
  24. echo ";;; Begin ${el}"
  25. cat ${el}
  26. echo ";;; End of ${el}"
  27. echo ""
  28. done
  29. fi
  30. done
  31. exit