showvdefaultemacs 852 B

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