source: projects/emacsen-common/trunk/show-vine-default.sh @ 7243

Revision 7243, 763 bytes checked in by daisuke, 11 years ago (diff)

add show-vine-default.sh to repository

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