Skip to content

Commit

Permalink
v4l-dvb: simplify git invocations
Browse files Browse the repository at this point in the history
Reduce unnecessary disk writes and additionally show progress to
indicate if transfer is stuck along the way.

Signed-off-by: Tomasz Maciej Nowak <[email protected]>
  • Loading branch information
tmn505 committed May 8, 2023
1 parent a8f86f3 commit 45f850f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions v4l-dvb/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ define Build/Prepare
(if [ -s $(DL_DIR)/$(V4L_SOURCE_FILE) ]; \
then $(CP) $(DL_DIR)/$(V4L_SOURCE_FILE) $(PKG_BUILD_DIR)/linux/linux-media.tar.bz2; \
else if [ -d $(DL_DIR)/$(V4L_REPO_NAME) ]; \
then (cd $(DL_DIR)/$(V4L_REPO_NAME); git checkout HEAD; git pull); \
else git clone --single-branch $(V4L_SOURCE_URL) $(DL_DIR)/$(V4L_REPO_NAME); \
then git -C $(DL_DIR)/$(V4L_REPO_NAME) fetch --progress; \
else git clone --progress --single-branch $(V4L_SOURCE_URL) $(DL_DIR)/$(V4L_REPO_NAME); \
fi; \
cd $(DL_DIR)/$(V4L_REPO_NAME); git checkout $(V4L_SOURCE_VERSION); \
git -C $(DL_DIR)/$(V4L_REPO_NAME) checkout --progress $(V4L_SOURCE_VERSION); \
cd $(PKG_BUILD_DIR)/linux; make tar DIR=$(DL_DIR)/$(V4L_REPO_NAME); \
$(CP) linux-media.tar.bz2 $(DL_DIR)/$(V4L_SOURCE_FILE); \
fi;)
Expand Down

0 comments on commit 45f850f

Please sign in to comment.