Skip to content

Instantly share code, notes, and snippets.

@asconix
Created January 30, 2019 10:40
Show Gist options
  • Save asconix/78fb27119851494c04ee60a2d247ca96 to your computer and use it in GitHub Desktop.
Save asconix/78fb27119851494c04ee60a2d247ca96 to your computer and use it in GitHub Desktop.
sqlite> select * from script;
1|case "etc/pkg.conf.sample" in
/*) sample_file="etc/pkg.conf.sample" ;;
*) sample_file="/usr/local/etc/pkg.conf.sample" ;;
esac
target_file="${sample_file%.sample}"
set -- etc/pkg.conf.sample
if [ $# -eq 2 ]; then
target_file=${2}
fi
case "${target_file}" in
/*) target_file="${target_file}" ;;
*) target_file="/usr/local/${target_file}" ;;
esac
if ! [ -f "${target_file}" ]; then
/bin/cp -p "${sample_file}" "${target_file}"
fi
/usr/sbin/service ldconfig restart > /dev/null
2|case "etc/pkg.conf.sample" in
/*) sample_file="etc/pkg.conf.sample" ;;
*) sample_file="/usr/local/etc/pkg.conf.sample" ;;
esac
target_file="${sample_file%.sample}"
set -- etc/pkg.conf.sample
if [ $# -eq 2 ]; then
set -- etc/pkg.conf.sample
target_file=${2}
fi
case "${target_file}" in
/*) target_file="${target_file}" ;;
*) target_file="/usr/local/${target_file}" ;;
esac
if cmp -s "${target_file}" "${sample_file}"; then
rm -f "${target_file}"
else
echo "You may need to manually remove ${target_file} if it is no longer needed."
fi
3|/usr/sbin/service ldconfig restart > /dev/null
4|makewhatis /usr/local/lib/perl5/site_perl/man
makewhatis /usr/local/lib/perl5/5.26/perl/man
/usr/sbin/service ldconfig restart > /dev/null
5|case "lib/perl5/5.26/perl/man/whatis" in
/*) f="lib/perl5/5.26/perl/man/whatis" ;;
*) f="/usr/local/lib/perl5/5.26/perl/man/whatis" ;;
esac
/bin/rm -f $f 2>/dev/null || /usr/bin/true
case "lib/perl5/5.26/perl/man/mandoc.db" in
/*) f="lib/perl5/5.26/perl/man/mandoc.db" ;;
*) f="/usr/local/lib/perl5/5.26/perl/man/mandoc.db" ;;
esac
/bin/rm -f $f 2>/dev/null || /usr/bin/true
case "lib/perl5/site_perl/man/whatis" in
/*) f="lib/perl5/site_perl/man/whatis" ;;
*) f="/usr/local/lib/perl5/site_perl/man/whatis" ;;
esac
/bin/rm -f $f 2>/dev/null || /usr/bin/true
case "lib/perl5/site_perl/man/mandoc.db" in
/*) f="lib/perl5/site_perl/man/mandoc.db" ;;
*) f="/usr/local/lib/perl5/site_perl/man/mandoc.db" ;;
esac
/bin/rm -f $f 2>/dev/null || /usr/bin/true
/usr/sbin/service ldconfig restart > /dev/null
6|/usr/sbin/service ldconfig restart > /dev/null
case "/usr/local/info/history.info" in
/*) file="/usr/local/info/history.info" ;;
*) file="/usr/local//usr/local/info/history.info" ;;
esac
indexinfo ${PKG_ROOTDIR}${file%/*}
case "/usr/local/info/readline.info" in
/*) file="/usr/local/info/readline.info" ;;
*) file="/usr/local//usr/local/info/readline.info" ;;
esac
indexinfo ${PKG_ROOTDIR}${file%/*}
case "/usr/local/info/rluserman.info" in
/*) file="/usr/local/info/rluserman.info" ;;
*) file="/usr/local//usr/local/info/rluserman.info" ;;
esac
indexinfo ${PKG_ROOTDIR}${file%/*}
7|/usr/sbin/service ldconfig restart > /dev/null
case "/usr/local/info/libffi.info" in
/*) file="/usr/local/info/libffi.info" ;;
*) file="/usr/local//usr/local/info/libffi.info" ;;
esac
indexinfo ${PKG_ROOTDIR}${file%/*}
8|/usr/sbin/service ldconfig restart > /dev/null
case "/usr/local/info/autosprintf.info" in
/*) file="/usr/local/info/autosprintf.info" ;;
*) file="/usr/local//usr/local/info/autosprintf.info" ;;
esac
indexinfo ${PKG_ROOTDIR}${file%/*}
9|case "etc/ssl/cert.pem.sample" in
/*) sample_file="etc/ssl/cert.pem.sample" ;;
*) sample_file="/usr/local/etc/ssl/cert.pem.sample" ;;
esac
target_file="${sample_file%.sample}"
set -- etc/ssl/cert.pem.sample
if [ $# -eq 2 ]; then
target_file=${2}
fi
case "${target_file}" in
/*) target_file="${target_file}" ;;
*) target_file="/usr/local/${target_file}" ;;
esac
if ! [ -f "${target_file}" ]; then
/bin/cp -p "${sample_file}" "${target_file}"
fi
case "openssl/cert.pem.sample" in
/*) sample_file="openssl/cert.pem.sample" ;;
*) sample_file="/usr/local/openssl/cert.pem.sample" ;;
esac
target_file="${sample_file%.sample}"
set -- openssl/cert.pem.sample
if [ $# -eq 2 ]; then
target_file=${2}
fi
case "${target_file}" in
/*) target_file="${target_file}" ;;
*) target_file="/usr/local/${target_file}" ;;
esac
if ! [ -f "${target_file}" ]; then
/bin/cp -p "${sample_file}" "${target_file}"
fi
[ ! -e /usr/local/bin/cert-sync ] || /usr/local/bin/cert-sync --quiet /usr/local/share/certs/ca-root-nss.crt
10|case "etc/ssl/cert.pem.sample" in
/*) sample_file="etc/ssl/cert.pem.sample" ;;
*) sample_file="/usr/local/etc/ssl/cert.pem.sample" ;;
esac
target_file="${sample_file%.sample}"
set -- etc/ssl/cert.pem.sample
if [ $# -eq 2 ]; then
set -- etc/ssl/cert.pem.sample
target_file=${2}
fi
case "${target_file}" in
/*) target_file="${target_file}" ;;
*) target_file="/usr/local/${target_file}" ;;
esac
if cmp -s "${target_file}" "${sample_file}"; then
rm -f "${target_file}"
else
echo "You may need to manually remove ${target_file} if it is no longer needed."
fi
case "openssl/cert.pem.sample" in
/*) sample_file="openssl/cert.pem.sample" ;;
*) sample_file="/usr/local/openssl/cert.pem.sample" ;;
esac
target_file="${sample_file%.sample}"
set -- openssl/cert.pem.sample
if [ $# -eq 2 ]; then
set -- openssl/cert.pem.sample
target_file=${2}
fi
case "${target_file}" in
/*) target_file="${target_file}" ;;
*) target_file="/usr/local/${target_file}" ;;
esac
if cmp -s "${target_file}" "${sample_file}"; then
rm -f "${target_file}"
else
echo "You may need to manually remove ${target_file} if it is no longer needed."
fi
15|case "bin/fish" in
/*) file="bin/fish" ;;
*) file="/usr/local/bin/fish" ;;
esac
cp ${PKG_ROOTDIR}/etc/shells ${PKG_ROOTDIR}/etc/shells.bak
(grep -v "^${file}$" ${PKG_ROOTDIR}/etc/shells.bak; echo ${file}) > ${PKG_ROOTDIR}/etc/shells
rm -f ${PKG_ROOTDIR}/etc/shells.bak
16|case "bin/fish" in
/*) file="bin/fish" ;;
*) file="/usr/local/bin/fish" ;;
esac
cp ${PKG_ROOTDIR}/etc/shells ${PKG_ROOTDIR}/etc/shells.bak
grep -v "^${file}$" ${PKG_ROOTDIR}/etc/shells.bak > ${PKG_ROOTDIR}/etc/shells
rm -f ${PKG_ROOTDIR}/etc/shells.bak
20|case "etc/poudriere.conf.sample" in
/*) sample_file="etc/poudriere.conf.sample" ;;
*) sample_file="/usr/local/etc/poudriere.conf.sample" ;;
esac
target_file="${sample_file%.sample}"
set -- etc/poudriere.conf.sample
if [ $# -eq 2 ]; then
target_file=${2}
fi
case "${target_file}" in
/*) target_file="${target_file}" ;;
*) target_file="/usr/local/${target_file}" ;;
esac
if ! [ -f "${target_file}" ]; then
/bin/cp -p "${sample_file}" "${target_file}"
fi
case "etc/poudriered.conf.sample" in
/*) sample_file="etc/poudriered.conf.sample" ;;
*) sample_file="/usr/local/etc/poudriered.conf.sample" ;;
esac
target_file="${sample_file%.sample}"
set -- etc/poudriered.conf.sample
if [ $# -eq 2 ]; then
target_file=${2}
fi
case "${target_file}" in
/*) target_file="${target_file}" ;;
*) target_file="/usr/local/${target_file}" ;;
esac
if ! [ -f "${target_file}" ]; then
/bin/cp -p "${sample_file}" "${target_file}"
fi
21|case "etc/poudriere.conf.sample" in
/*) sample_file="etc/poudriere.conf.sample" ;;
*) sample_file="/usr/local/etc/poudriere.conf.sample" ;;
esac
target_file="${sample_file%.sample}"
set -- etc/poudriere.conf.sample
if [ $# -eq 2 ]; then
set -- etc/poudriere.conf.sample
target_file=${2}
fi
case "${target_file}" in
/*) target_file="${target_file}" ;;
*) target_file="/usr/local/${target_file}" ;;
esac
if cmp -s "${target_file}" "${sample_file}"; then
rm -f "${target_file}"
else
echo "You may need to manually remove ${target_file} if it is no longer needed."
fi
case "etc/poudriered.conf.sample" in
/*) sample_file="etc/poudriered.conf.sample" ;;
*) sample_file="/usr/local/etc/poudriered.conf.sample" ;;
esac
target_file="${sample_file%.sample}"
set -- etc/poudriered.conf.sample
if [ $# -eq 2 ]; then
set -- etc/poudriered.conf.sample
target_file=${2}
fi
case "${target_file}" in
/*) target_file="${target_file}" ;;
*) target_file="/usr/local/${target_file}" ;;
esac
if cmp -s "${target_file}" "${sample_file}"; then
rm -f "${target_file}"
else
echo "You may need to manually remove ${target_file} if it is no longer needed."
fi
22|case "etc/rsync/rsyncd.conf.sample" in
/*) sample_file="etc/rsync/rsyncd.conf.sample" ;;
*) sample_file="/usr/local/etc/rsync/rsyncd.conf.sample" ;;
esac
target_file="${sample_file%.sample}"
set -- etc/rsync/rsyncd.conf.sample
if [ $# -eq 2 ]; then
target_file=${2}
fi
case "${target_file}" in
/*) target_file="${target_file}" ;;
*) target_file="/usr/local/${target_file}" ;;
esac
if ! [ -f "${target_file}" ]; then
/bin/cp -p "${sample_file}" "${target_file}"
fi
23|case "etc/rsync/rsyncd.conf.sample" in
/*) sample_file="etc/rsync/rsyncd.conf.sample" ;;
*) sample_file="/usr/local/etc/rsync/rsyncd.conf.sample" ;;
esac
target_file="${sample_file%.sample}"
set -- etc/rsync/rsyncd.conf.sample
if [ $# -eq 2 ]; then
set -- etc/rsync/rsyncd.conf.sample
target_file=${2}
fi
case "${target_file}" in
/*) target_file="${target_file}" ;;
*) target_file="/usr/local/${target_file}" ;;
esac
if cmp -s "${target_file}" "${sample_file}"; then
rm -f "${target_file}"
else
echo "You may need to manually remove ${target_file} if it is no longer needed."
fi
27|if [ -n "${PKG_ROOTDIR}" ] && [ "${PKG_ROOTDIR}" != "/" ]; then
PW="/usr/sbin/pw -R ${PKG_ROOTDIR}"
else
PW=/usr/sbin/pw
fi
echo "===> Creating groups."
if ! ${PW} groupshow git_daemon >/dev/null 2>&1; then
echo "Creating group 'git_daemon' with gid '964'."
${PW} groupadd git_daemon -g 964
else
echo "Using existing group 'git_daemon'."
fi
echo "===> Creating users"
if ! ${PW} usershow git_daemon >/dev/null 2>&1; then
echo "Creating user 'git_daemon' with uid '964'."
${PW} useradd git_daemon -u 964 -g 964 -c "git daemon" -d /nonexistent -s /usr/sbin/nologin
else
echo "Using existing user 'git_daemon'."
fi
28|case "libexec/git-core/git-shell" in
/*) file="libexec/git-core/git-shell" ;;
*) file="/usr/local/libexec/git-core/git-shell" ;;
esac
cp ${PKG_ROOTDIR}/etc/shells ${PKG_ROOTDIR}/etc/shells.bak
(grep -v "^${file}$" ${PKG_ROOTDIR}/etc/shells.bak; echo ${file}) > ${PKG_ROOTDIR}/etc/shells
rm -f ${PKG_ROOTDIR}/etc/shells.bak
case "etc/git/gitweb.conf.sample" in
/*) sample_file="etc/git/gitweb.conf.sample" ;;
*) sample_file="/usr/local/etc/git/gitweb.conf.sample" ;;
esac
target_file="${sample_file%.sample}"
set -- etc/git/gitweb.conf.sample
if [ $# -eq 2 ]; then
target_file=${2}
fi
case "${target_file}" in
/*) target_file="${target_file}" ;;
*) target_file="/usr/local/${target_file}" ;;
esac
if ! [ -f "${target_file}" ]; then
/bin/cp -p "${sample_file}" "${target_file}"
fi
29|case "libexec/git-core/git-shell" in
/*) file="libexec/git-core/git-shell" ;;
*) file="/usr/local/libexec/git-core/git-shell" ;;
esac
cp ${PKG_ROOTDIR}/etc/shells ${PKG_ROOTDIR}/etc/shells.bak
grep -v "^${file}$" ${PKG_ROOTDIR}/etc/shells.bak > ${PKG_ROOTDIR}/etc/shells
rm -f ${PKG_ROOTDIR}/etc/shells.bak
case "etc/git/gitweb.conf.sample" in
/*) sample_file="etc/git/gitweb.conf.sample" ;;
*) sample_file="/usr/local/etc/git/gitweb.conf.sample" ;;
esac
target_file="${sample_file%.sample}"
set -- etc/git/gitweb.conf.sample
if [ $# -eq 2 ]; then
set -- etc/git/gitweb.conf.sample
target_file=${2}
fi
case "${target_file}" in
/*) target_file="${target_file}" ;;
*) target_file="/usr/local/${target_file}" ;;
esac
if cmp -s "${target_file}" "${sample_file}"; then
rm -f "${target_file}"
else
echo "You may need to manually remove ${target_file} if it is no longer needed."
fi
30|if [ -n "${PKG_ROOTDIR}" ] && [ "${PKG_ROOTDIR}" != "/" ]; then
PW="/usr/sbin/pw -R ${PKG_ROOTDIR}"
else
PW=/usr/sbin/pw
fi
if ${PW} usershow git_daemon >/dev/null 2>&1; then
echo "==> You should manually remove the \"git_daemon\" user. "
fi
if ${PW} groupshow git_daemon >/dev/null 2>&1; then
echo "==> You should manually remove the \"git_daemon\" group "
fi
31|/usr/sbin/service ldconfig restart > /dev/null
case "/usr/local/info/libunistring.info" in
/*) file="/usr/local/info/libunistring.info" ;;
*) file="/usr/local//usr/local/info/libunistring.info" ;;
esac
indexinfo ${PKG_ROOTDIR}${file%/*}
32|/usr/sbin/service ldconfig restart > /dev/null
case "/usr/local/info/libidn2.info" in
/*) file="/usr/local/info/libidn2.info" ;;
*) file="/usr/local//usr/local/info/libidn2.info" ;;
esac
indexinfo ${PKG_ROOTDIR}${file%/*}
36|case "etc/fonts/fonts.conf.sample" in
/*) sample_file="etc/fonts/fonts.conf.sample" ;;
*) sample_file="/usr/local/etc/fonts/fonts.conf.sample" ;;
esac
target_file="${sample_file%.sample}"
set -- etc/fonts/fonts.conf.sample
if [ $# -eq 2 ]; then
target_file=${2}
fi
case "${target_file}" in
/*) target_file="${target_file}" ;;
*) target_file="/usr/local/${target_file}" ;;
esac
if ! [ -f "${target_file}" ]; then
/bin/cp -p "${sample_file}" "${target_file}"
fi
/usr/sbin/service ldconfig restart > /dev/null
37|case "etc/fonts/fonts.conf.sample" in
/*) sample_file="etc/fonts/fonts.conf.sample" ;;
*) sample_file="/usr/local/etc/fonts/fonts.conf.sample" ;;
esac
target_file="${sample_file%.sample}"
set -- etc/fonts/fonts.conf.sample
if [ $# -eq 2 ]; then
set -- etc/fonts/fonts.conf.sample
target_file=${2}
fi
case "${target_file}" in
/*) target_file="${target_file}" ;;
*) target_file="/usr/local/${target_file}" ;;
esac
if cmp -s "${target_file}" "${sample_file}"; then
rm -f "${target_file}"
else
echo "You may need to manually remove ${target_file} if it is no longer needed."
fi
38|#!/bin/sh
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin
export PATH
if [ "$2" = "POST-INSTALL" ]; then
echo "Running fc-cache to build fontconfig cache..."
fc-cache -f -s -v
exit 0
fi
39|case "/usr/local/share/fonts/dejavu" in
/*) fontsdir="/usr/local/share/fonts/dejavu" ;;
*) fontsdir="/usr/local//usr/local/share/fonts/dejavu" ;;
esac
fc-cache -fs ${fontsdir} 2>/dev/null || true
mkfontscale ${fontsdir} 2>/dev/null || true
mkfontdir ${fontsdir} 2>/dev/null || true
40|case "/usr/local/share/fonts/dejavu" in
/*) fontsdir="/usr/local/share/fonts/dejavu" ;;
*) fontsdir="/usr/local//usr/local/share/fonts/dejavu" ;;
esac
fc-cache -fs ${fontsdir} 2>/dev/null || true
mkfontscale ${fontsdir} 2>/dev/null || true
if [ -e ${fontsdir}/fonts.scale -a "`stat -f '%z' ${fontsdir}/fonts.scale 2>/dev/null`" = '2' ]; then
rm ${fontsdir}/fonts.scale
fi
mkfontdir ${fontsdir} 2>/dev/null || true
if [ -e ${fontsdir}/fonts.dir -a "`stat -f '%z' ${fontsdir}/fonts.dir 2>/dev/null`" = '2' ]; then
rm ${fontsdir}/fonts.dir
fi
41|case "etc/javavm_opts.conf.dist" in
/*) sample_file="etc/javavm_opts.conf.dist" ;;
*) sample_file="/usr/local/etc/javavm_opts.conf.dist" ;;
esac
target_file="${sample_file%.sample}"
set -- etc/javavm_opts.conf.dist etc/javavm_opts.conf
if [ $# -eq 2 ]; then
target_file=${2}
fi
case "${target_file}" in
/*) target_file="${target_file}" ;;
*) target_file="/usr/local/${target_file}" ;;
esac
if ! [ -f "${target_file}" ]; then
/bin/cp -p "${sample_file}" "${target_file}"
fi
42|case "etc/javavm_opts.conf.dist" in
/*) sample_file="etc/javavm_opts.conf.dist" ;;
*) sample_file="/usr/local/etc/javavm_opts.conf.dist" ;;
esac
target_file="${sample_file%.sample}"
set -- etc/javavm_opts.conf.dist etc/javavm_opts.conf
if [ $# -eq 2 ]; then
set -- etc/javavm_opts.conf.dist etc/javavm_opts.conf
target_file=${2}
fi
case "${target_file}" in
/*) target_file="${target_file}" ;;
*) target_file="/usr/local/${target_file}" ;;
esac
if cmp -s "${target_file}" "${sample_file}"; then
rm -f "${target_file}"
else
echo "You may need to manually remove ${target_file} if it is no longer needed."
fi
43|#!/bin/sh
#
# $FreeBSD: /tmp/pcvs/ports/java/javavmwrapper/files/pkg-install.in,v 1.3 2006-06-03 17:32:24 glewis Exp $
LOCALBASE=/usr/local
# This script runs during post-install
if [ "x${2}" != "xPOST-INSTALL" ]; then
exit 0
fi
# Ensure all JDKs and JREs are installed
_excl_dirs='bootstrap-openjdk'
_find_expr='-depth 2 -regex .*/bin/java'
for dir in ${_excl_dirs}; do
_find_expr="${_find_expr} ! -regex ${dir}/bin/java"
done
for jvm in `cd "${LOCALBASE}" && find *jdk* *jre* ${_find_expr} 2> /dev/null`; do
if [ -x "${LOCALBASE}/${jvm}" ]; then
"${PKG_PREFIX}"/bin/registervm "${LOCALBASE}/${jvm}" > /dev/null 2>&1
fi
done
# Ensure all VMs are configured correctly
"${PKG_PREFIX}"/bin/checkvms
44|case "etc/asound.conf.sample" in
/*) sample_file="etc/asound.conf.sample" ;;
*) sample_file="/usr/local/etc/asound.conf.sample" ;;
esac
target_file="${sample_file%.sample}"
set -- etc/asound.conf.sample
if [ $# -eq 2 ]; then
target_file=${2}
fi
case "${target_file}" in
/*) target_file="${target_file}" ;;
*) target_file="/usr/local/${target_file}" ;;
esac
if ! [ -f "${target_file}" ]; then
/bin/cp -p "${sample_file}" "${target_file}"
fi
/usr/sbin/service ldconfig restart > /dev/null
45|case "etc/asound.conf.sample" in
/*) sample_file="etc/asound.conf.sample" ;;
*) sample_file="/usr/local/etc/asound.conf.sample" ;;
esac
target_file="${sample_file%.sample}"
set -- etc/asound.conf.sample
if [ $# -eq 2 ]; then
set -- etc/asound.conf.sample
target_file=${2}
fi
case "${target_file}" in
/*) target_file="${target_file}" ;;
*) target_file="/usr/local/${target_file}" ;;
esac
if cmp -s "${target_file}" "${sample_file}"; then
rm -f "${target_file}"
else
echo "You may need to manually remove ${target_file} if it is no longer needed."
fi
46|registervm /usr/local/openjdk8-jre/bin/java
47|unregistervm /usr/local/openjdk8-jre/bin/java
48|case "bin/bash" in
/*) file="bin/bash" ;;
*) file="/usr/local/bin/bash" ;;
esac
cp ${PKG_ROOTDIR}/etc/shells ${PKG_ROOTDIR}/etc/shells.bak
(grep -v "^${file}$" ${PKG_ROOTDIR}/etc/shells.bak; echo ${file}) > ${PKG_ROOTDIR}/etc/shells
rm -f ${PKG_ROOTDIR}/etc/shells.bak
case "bin/rbash" in
/*) file="bin/rbash" ;;
*) file="/usr/local/bin/rbash" ;;
esac
cp ${PKG_ROOTDIR}/etc/shells ${PKG_ROOTDIR}/etc/shells.bak
(grep -v "^${file}$" ${PKG_ROOTDIR}/etc/shells.bak; echo ${file}) > ${PKG_ROOTDIR}/etc/shells
rm -f ${PKG_ROOTDIR}/etc/shells.bak
case "/usr/local/share/info/bash.info" in
/*) file="/usr/local/share/info/bash.info" ;;
*) file="/usr/local//usr/local/share/info/bash.info" ;;
esac
indexinfo ${PKG_ROOTDIR}${file%/*}
49|case "bin/bash" in
/*) file="bin/bash" ;;
*) file="/usr/local/bin/bash" ;;
esac
cp ${PKG_ROOTDIR}/etc/shells ${PKG_ROOTDIR}/etc/shells.bak
grep -v "^${file}$" ${PKG_ROOTDIR}/etc/shells.bak > ${PKG_ROOTDIR}/etc/shells
rm -f ${PKG_ROOTDIR}/etc/shells.bak
case "bin/rbash" in
/*) file="bin/rbash" ;;
*) file="/usr/local/bin/rbash" ;;
esac
cp ${PKG_ROOTDIR}/etc/shells ${PKG_ROOTDIR}/etc/shells.bak
grep -v "^${file}$" ${PKG_ROOTDIR}/etc/shells.bak > ${PKG_ROOTDIR}/etc/shells
rm -f ${PKG_ROOTDIR}/etc/shells.bak
50|case "/usr/local/share/info/bash.info" in
/*) file="/usr/local/share/info/bash.info" ;;
*) file="/usr/local//usr/local/share/info/bash.info" ;;
esac
indexinfo ${PKG_ROOTDIR}${file%/*}
51|case "etc/wgetrc.sample" in
/*) sample_file="etc/wgetrc.sample" ;;
*) sample_file="/usr/local/etc/wgetrc.sample" ;;
esac
target_file="${sample_file%.sample}"
set -- etc/wgetrc.sample
if [ $# -eq 2 ]; then
target_file=${2}
fi
case "${target_file}" in
/*) target_file="${target_file}" ;;
*) target_file="/usr/local/${target_file}" ;;
esac
if ! [ -f "${target_file}" ]; then
/bin/cp -p "${sample_file}" "${target_file}"
fi
case "/usr/local/share/info/wget.info" in
/*) file="/usr/local/share/info/wget.info" ;;
*) file="/usr/local//usr/local/share/info/wget.info" ;;
esac
indexinfo ${PKG_ROOTDIR}${file%/*}
52|case "etc/wgetrc.sample" in
/*) sample_file="etc/wgetrc.sample" ;;
*) sample_file="/usr/local/etc/wgetrc.sample" ;;
esac
target_file="${sample_file%.sample}"
set -- etc/wgetrc.sample
if [ $# -eq 2 ]; then
set -- etc/wgetrc.sample
target_file=${2}
fi
case "${target_file}" in
/*) target_file="${target_file}" ;;
*) target_file="/usr/local/${target_file}" ;;
esac
if cmp -s "${target_file}" "${sample_file}"; then
rm -f "${target_file}"
else
echo "You may need to manually remove ${target_file} if it is no longer needed."
fi
53|case "/usr/local/share/info/wget.info" in
/*) file="/usr/local/share/info/wget.info" ;;
*) file="/usr/local//usr/local/share/info/wget.info" ;;
esac
indexinfo ${PKG_ROOTDIR}${file%/*}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment