summaryrefslogtreecommitdiffstats
path: root/package/python-setproctitle/python-setproctitle.hash
diff options
context:
space:
mode:
authorYann E. MORIN <yann.morin.1998@free.fr>2016-05-07 18:14:26 +0200
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2016-05-11 23:14:37 +0200
commit88bad8f462c31679106fe68b6c3b1bd4be68cc2f (patch)
treee0c5771bab9e9aa2051ff3ddda50d7b6c8fd3879 /package/python-setproctitle/python-setproctitle.hash
parentadbdc6e58f2b387dc4200f2acbf9cc307cbc8838 (diff)
downloadbuildroot-88bad8f462c31679106fe68b6c3b1bd4be68cc2f.tar.gz
buildroot-88bad8f462c31679106fe68b6c3b1bd4be68cc2f.zip
support/scripts: add helper to hardlink-or-copy
When preparing the legal-info, the source archives are copied in the legal-info/ output directory. When the archives are big, it can take quite a bit of time and unnecessarily uses disk space. When the legal-info output directory is on the same filesystem as the BR2_DL_DIR, we can easily reduce copy time and disk usage by just using hardlins instead of copying. However, the BR2_DL_DIR may be on a different filesystem, so we must fallback to copying in this case Introduce a helper script that copies a source file into a destination directory, by first attempting to hard-link, and falling back to a plain copy in case the hardlink fails. In case the destination already exists, it is forcibly removed first, to avoid clobering any existing target file (and especially any hardlink to it), since cp -f does not remove the destination file, but clobbers it. In some situations, it will be necessary that the destination file is named differently than the source, so if a third argument is specified, it is treated as the basename of the destination file. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Luca Ceresoli <luca@lucaceresoli.net> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/python-setproctitle/python-setproctitle.hash')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud