Skip to content

Commit

Permalink
clone refactor - kamangir/bolt#1234
Browse files Browse the repository at this point in the history
  • Loading branch information
kamangir committed Feb 29, 2024
1 parent 65271d9 commit fbb2c81
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion abcli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

NAME = "abcli"

VERSION = "7.2799.1"
VERSION = "7.2802.1"

DESCRIPTION = "🚀 a language to speak AI."

Expand Down
16 changes: 14 additions & 2 deletions bash/plugins/clone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,13 @@ function abcli_clone() {
[[ "$do_download" == 1 ]] &&
abcli_download - $object_1_name

local object_1_path=$abcli_object_root/$object_1_name
local object_2_path=$abcli_object_root/$object_2_name

abcli_eval - \
rsync -arv \
$abcli_object_root/$object_1_name/ \
$abcli_object_root/$object_2_name
$object_1_path/ \
$object_2_path

[[ "$clone_cache" == 1 ]] &&
abcli_cache clone $object_1_name $object_2_name
Expand All @@ -42,6 +45,15 @@ function abcli_clone() {
abcli_tag set $object_2_name clone
fi

pushd $object_1_path >/dev/null
local filename
for filename in $object_1_name.*; do
cp -v \
$filename \
$object_2_path/$object_2_name.${filename##*.}
done
popd >/dev/null

[[ "$do_upload" == 1 ]] &&
abcli_upload - $object_2_name
}

0 comments on commit fbb2c81

Please sign in to comment.