upgrade.sh
changeset 104 c0b5afb89088
parent 102 485d3f7d6981
child 118 cf85d78486ce
equal deleted inserted replaced
103:edac75d0b435 104:c0b5afb89088
     7 PATH=/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
     7 PATH=/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
     8 PREFIX=/usr/local
     8 PREFIX=/usr/local
     9 
     9 
    10 PF_CONFDIR=$(postconf -h config_directory)
    10 PF_CONFDIR=$(postconf -h config_directory)
    11 PF_GID=$(id -g $(postconf -h mail_owner))
    11 PF_GID=$(id -g $(postconf -h mail_owner))
       
    12 POSTCONF=$(which postconf)
    12 LOCALE_DIR=${PREFIX}/share/locale
    13 LOCALE_DIR=${PREFIX}/share/locale
    13 DOC_DIR=${PREFIX}/share/doc/vmm
    14 DOC_DIR=${PREFIX}/share/doc/vmm
    14 if [ ${PREFIX} = "/usr" ]; then
    15 if [ ${PREFIX} = "/usr" ]; then
    15     MANDIR=${PREFIX}/share/man
    16     MANDIR=${PREFIX}/share/man
    16 else
    17 else
    39     [ -d ${ddir}  ] || mkdir -m 0755 -p ${ddir}
    40     [ -d ${ddir}  ] || mkdir -m 0755 -p ${ddir}
    40     msgfmt -o ${LOCALE_DIR}/${lang}/LC_MESSAGES/vmm.mo ${po}
    41     msgfmt -o ${LOCALE_DIR}/${lang}/LC_MESSAGES/vmm.mo ${po}
    41 done
    42 done
    42 cd - >/dev/null
    43 cd - >/dev/null
    43 
    44 
       
    45 # remove misplaced manual pages
       
    46 if [ -f /usr/local/share/man/man1/vmm.1 ]; then
       
    47     rm -f /usr/local/share/man/man1/vmm.1
       
    48 fi
       
    49 if [ -f /usr/local/share/man/man5/vmm.cfg.5 ]; then
       
    50     rm -f /usr/local/share/man/man5/vmm.cfg.5
       
    51 fi
       
    52 
    44 # install manual pages
    53 # install manual pages
    45 cd man
    54 cd man
    46 [ -d ${MANDIR}/man1 ] || mkdir -m 0755 -p ${MANDIR}/man1
    55 [ -d ${MANDIR}/man1 ] || mkdir -m 0755 -p ${MANDIR}/man1
    47 install -m 0644 ${INSTALL_OPTS} man1/vmm.1 ${MANDIR}/man1
    56 install -m 0644 ${INSTALL_OPTS} man1/vmm.1 ${MANDIR}/man1
    48 
    57 
    70 
    79 
    71 [ -d ${DOC_DIR}/examples ] || mkdir -m 0755 -p ${DOC_DIR}/examples
    80 [ -d ${DOC_DIR}/examples ] || mkdir -m 0755 -p ${DOC_DIR}/examples
    72 install -m 0644 ${INSTALL_OPTS} pgsql-*.cf ${DOC_DIR}/examples
    81 install -m 0644 ${INSTALL_OPTS} pgsql-*.cf ${DOC_DIR}/examples
    73 install -m 0644 ${INSTALL_OPTS} vmm.cfg ${DOC_DIR}/examples
    82 install -m 0644 ${INSTALL_OPTS} vmm.cfg ${DOC_DIR}/examples
    74 
    83 
       
    84 # update config file
       
    85 ./update_config_0.4.x-0.5.py $POSTCONF
       
    86