From a80eb550b5765badd028e0ff307a4331f0eadb7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Sun, 9 Nov 2025 06:47:08 +0300 Subject: [PATCH] copy dist --- dbg.clone | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/dbg.clone b/dbg.clone index 7203f4c..5d69b67 100755 --- a/dbg.clone +++ b/dbg.clone @@ -3,16 +3,17 @@ SDIR=$(cd "$(dirname "$0")" ; pwd -P) DST_DIR=/Users/mk/test-dist MAIN_BRANCH=main +REPO_DIR=/Users/mk/test-repo REPO_URL=https://github.com/kornerr/ru TMP_BRANCHES=/tmp/dbg-branches # Clone since the directory does not exist -if [ ! -d "$DST_DIR" ]; then - git clone $REPO_URL $DST_DIR +if [ ! -d "$REPO_DIR" ]; then + git clone $REPO_URL $REPO_DIR fi -# ?? Pull the latest changes -cd $DST_DIR +# Get the latest changes +cd $REPO_DIR git checkout -f $MAIN_BRANCH git fetch --all @@ -22,5 +23,9 @@ git fetch --all cmt=`git branch -av --sort=-committerdate | tr -s ' ' | head -n1 | cut -d' ' -f3` echo "Latest commit: $cmt" -# Switch to the latest branch +# Switch to the latest commit git checkout $cmt + +# Copy dist +mkdir -p $DST_DIR +cp -R dist/* $DST_DIR