Commit 25826373 authored by Eric Bélanger's avatar Eric Bélanger Committed by Pierre Schmitz
Browse files

checkpkg: Use symlinks in work directory instead of copying the packages

parent 74df2a90
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -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