Skip to content

Commit

Permalink
Simplify source copy error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
mlschroe committed Feb 4, 2022
1 parent 03a8b94 commit 7594082
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
5 changes: 1 addition & 4 deletions build-recipe-docker
Expand Up @@ -35,10 +35,7 @@ recipe_setup_docker() {
if test -z "$LINKSOURCES" ; then
copy_sources "$MYSRCDIR" "$BUILD_ROOT$TOPDIR/SOURCES/"
else
cp -lR "$MYSRCDIR"/* $BUILD_ROOT$TOPDIR/SOURCES/
if test "$?" != 0 ; then
cleanup_and_exit 1 "source copy failed"
fi
cp -lR "$MYSRCDIR"/* $BUILD_ROOT$TOPDIR/SOURCES/ || cleanup_and_exit 1 "source copy failed"
fi
fi
chown -hR "$ABUILD_UID:$ABUILD_GID" "$BUILD_ROOT$TOPDIR"
Expand Down
5 changes: 1 addition & 4 deletions build-recipe-helm
Expand Up @@ -28,10 +28,7 @@ recipe_setup_helm() {
if test -z "$LINKSOURCES" ; then
copy_sources "$MYSRCDIR" "$BUILD_ROOT$TOPDIR/SOURCES/"
else
cp -lR "$MYSRCDIR"/* $BUILD_ROOT$TOPDIR/SOURCES/
if test "$?" != 0 ; then
cleanup_and_exit 1 "source copy failed"
fi
cp -lR "$MYSRCDIR"/* $BUILD_ROOT$TOPDIR/SOURCES/ || cleanup_and_exit 1 "source copy failed"
fi
fi
chown -hR "$ABUILD_UID:$ABUILD_GID" "$BUILD_ROOT$TOPDIR"
Expand Down
7 changes: 2 additions & 5 deletions build-recipe-kiwi
Expand Up @@ -316,12 +316,9 @@ recipe_setup_kiwi() {
mv "$MYSRCDIR"/* $BUILD_ROOT$TOPDIR/SOURCES/
else
if test -z "$LINKSOURCES" ; then
cp -dLR "$MYSRCDIR"/* $BUILD_ROOT$TOPDIR/SOURCES/
cp -dLR "$MYSRCDIR"/* $BUILD_ROOT$TOPDIR/SOURCES/ || cleanup_and_exit 1 "source copy failed"
else
cp -lR "$MYSRCDIR"/* $BUILD_ROOT$TOPDIR/SOURCES/
fi
if test "$?" != 0 ; then
cleanup_and_exit 1 "source copy failed"
cp -lR "$MYSRCDIR"/* $BUILD_ROOT$TOPDIR/SOURCES/ || cleanup_and_exit 1 "source copy failed"
fi
fi
chown -hR "$ABUILD_UID:$ABUILD_GID" "$BUILD_ROOT$TOPDIR"
Expand Down

0 comments on commit 7594082

Please sign in to comment.