1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-01-17 22:31:12 +01:00
zsh/Config/installfns.sh

34 lines
832 B
Bash
Raw Normal View History

1999-07-12 19:02:40 +02:00
#!/bin/sh
1999-09-08 01:07:57 +02:00
fndir=$DESTDIR$fndir
$sdir_top/mkinstalldirs $fndir || exit 1;
1999-07-12 19:02:40 +02:00
# If the source directory is somewhere else, we need to force
# the shell to expand it in that directory, then strip it off.
install=
for file in $FUNCTIONS_INSTALL; do
if test -f "$sdir/$file"; then
install="$install $file"
else
1999-09-01 20:20:53 +02:00
install="$install `echo '' $sdir/$file | sed -e \"s% $sdir/% %g\"`"
1999-07-12 19:02:40 +02:00
fi
done
for file in $install; do
if test -f $sdir/$file; then
if test x$FUNCTIONS_SUBDIRS != x -a x$FUNCTIONS_SUBDIRS != xno; then
subfile="$file"
subdir="`echo $file | sed -e 's%/[^/]*$%%'`"
1999-09-08 01:07:57 +02:00
instdir="$fndir/$subdir"
1999-07-12 19:02:40 +02:00
else
subfile="`echo $file | sed -e 's%^.*/%%'`"
1999-09-08 01:07:57 +02:00
instdir="$fndir"
1999-07-12 19:02:40 +02:00
fi
1999-09-08 00:31:53 +02:00
$sdir_top/mkinstalldirs $instdir || exit 1
$INSTALL_DATA $sdir/$file $instdir || exit 1
1999-07-12 19:02:40 +02:00
fi
done
exit 0