/usr/share/freepwing/cphier is in freepwing 1.5-2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | #! /bin/sh
# -*- sh -*-
# Copyright (c) 2000 Motoyuki Kasahara
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
MKDIRHIER="/usr/share/freepwing/mkdirhier"
if [ $# -lt 2 ] ; then
echo "$0: too few argument" 1>&2
exit 1
fi
if [ $# -gt 2 ] ; then
echo "$0: too many arguments" 1>&2
exit 1
fi
SRCARG="`echo X$1 | sed -e 's/^X//' -e 's,//*,/,g'`"
DESTARG="`echo X$2 | sed -e 's/^X//' -e 's,//*,/,g'`"
if [ -f "${SRCARG}" ] ; then
DESTDIR="`echo X${DESTARG} | sed -e 's/^X//' -e 's,/[^/][^/]*$,,g'`"
${MKDIRHIER} ${DESTDIR} || exit 1
cp -p ${SRCARG} ${DESTARG} || exit 1
else
if [ -d "${SRCARG}" ] ; then
DESTDIR="`echo X${DESTARG} | sed -e 's/^X//' -e 's,/[^/]*$,,g'`"
${MKDIRHIER} ${DESTDIR} || exit 1
tar cf - ${SRCARG} | (cd ${DESTDIR} && tar xfp -) || exit 1
else
echo "$0: no such file or directory: $SRCARG" 1>&2
exit 1
fi
fi
exit 0
|