install.sh: don't clobber dangling symlinks
authorBaruch Siach <baruch@tkos.co.il>
Tue, 17 Jul 2018 10:40:45 +0000 (13:40 +0300)
committerDenys Vlasenko <vda.linux@googlemail.com>
Tue, 31 Jul 2018 13:49:19 +0000 (15:49 +0200)
commit3d07446cef196c8c6f92a4d8006a56d348fca062
treeecea43b103953e246b73621a99411f2ee17d202c
parente8073519d8d851d5f7e7c1fde8c9b9e65c4ab458
install.sh: don't clobber dangling symlinks

Symlinks in a subdirectory that is to become target rootfs are sometimes
dangling because they link to canonical file names that are not present
on the host, but are present relative to the target rootfs root. Don't
copy over dangling symlinks when noclobber is enabled

The -e test treats dangling symlinks as non-existent files. Add -h test
that returns true for all symlinks.

Cc: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
applets/install.sh