From 2582637376a4643590c4893d4b19c6eadb2ac5ed Mon Sep 17 00:00:00 2001 From: Eric Bélanger Date: Mon, 8 Aug 2011 15:16:23 -0400 Subject: checkpkg: Use symlinks in work directory instead of copying the packages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Eric Bélanger Signed-off-by: Pierre Schmitz --- checkpkg | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'checkpkg') diff --git a/checkpkg b/checkpkg index c349795..c0b2ceb 100755 --- a/checkpkg +++ b/checkpkg @@ -39,9 +39,9 @@ for _pkgname in ${pkgname[@]}; do fi if [ -f "$STARTDIR/$pkgfile" ]; then - cp "$STARTDIR/$pkgfile" . + ln -s "$STARTDIR/$pkgfile" "$pkgfile" elif [ -f "$PKGDEST/$pkgfile" ]; then - cp "$PKGDEST/$pkgfile" . + ln -s "$PKGDEST/$pkgfile" "$pkgfile" else echo "File \"$pkgfile\" doesn't exist" exit 1 @@ -65,11 +65,11 @@ for _pkgname in ${pkgname[@]}; do if [ ! -f $oldpkg ]; then if echo $pkgurl | grep '^file:///' > /dev/null 2>&1; then - cp $(echo $pkgurl | sed 's#^file://##') . + ln -s "${pkgurl#file://}" $(basename "${pkgurl#file://}") elif [ -f "$PKGDEST/$oldpkg" ]; then - cp "$PKGDEST/$oldpkg" . + ln -s "$PKGDEST/$oldpkg" "$oldpkg" elif [ -f "$STARTDIR/$oldpkg" ]; then - cp "$STARTDIR/$oldpkg" . + ln -s "$STARTDIR/$oldpkg" "$oldpkg" else wget --quiet $pkgurl fi -- cgit v1.2.3-70-g09d2