Skip to content

Commit c9d8b2f

Browse files
authored
Merge pull request #1297 from jongough/jg_master_update
Update to cater for new cloudsmith page format
2 parents f5c52ea + 5364eb0 commit c9d8b2f

17 files changed

Lines changed: 4 additions & 424 deletions

download_xml_bash.sh

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,33 +21,29 @@ LEVEL="$4"
2121

2222
REPO="https://cloudsmith.io/~${USER}/repos/"
2323
echo "Issuing command: wget -q -O - $REPO${NAME}-${LEVEL}/packages/?q=*${VERSION}*.xml"
24-
my_array=()
2524
echo "Show current files that match criteria"
2625
ls metadata/${NAME}*-*${VERSION}*xml -la
2726
echo "Deleting current files that match criteria"
2827
rm metadata/${NAME}*-*${VERSION}*xml
2928
echo "Finding files on remote cloudsmith repository"
3029
delimiter="href=\""
31-
delimiter1=".xml\" title"
30+
delimiter1=".xml"
3231
my_array=();
3332
while read -r line; do
34-
if [[ $line == *$delimiter* ]] && [[ $line == *$delimiter1* ]]; then
33+
if [[ "$line" =~ ^$delimiter && "$line" =~ $delimiter1.$ ]]; then
3534
start=`awk -v a="$line" -v b="$delimiter" 'BEGIN{print index(a,b)}'`
3635
start=$((start + ${#delimiter} - 1))
3736
end=`awk -v a="$line" -v b="$delimiter1" 'BEGIN{print index(a,b)}'`
3837
end=$((end + 3 - start))
3938
line=${line:$start:$end}
4039
my_array+=( $line );
41-
echo "found: $line"
4240
fi
43-
done < <(wget -q -O - "$REPO${NAME}-${LEVEL}/packages/?q=*${VERSION}*xml+tag:latest&page_size=50")
44-
41+
done < <(wget -q -O - "${REPO}${NAME}-${LEVEL}/packages/?q=*${VERSION}*")
4542
echo "Downloading files found that match criteria"
4643
for URL in "${my_array[@]}"
4744
do
4845
echo "URL: $URL"
4946
wget --progress=bar:force:noscroll -c $URL -P metadata
5047
done
5148
echo "Files downloaded"
52-
ls -la metadata/${NAME}*-*${VERSION}*xml
53-
49+
ls -la metadata/$NAME*-*$VERSION*xml

metadata/testplugin_pi-1.0.328.0-android-arm64-16-android-arm64.xml

Lines changed: 0 additions & 26 deletions
This file was deleted.

metadata/testplugin_pi-1.0.328.0-android-armhf-16-android-armhf.xml

Lines changed: 0 additions & 26 deletions
This file was deleted.

metadata/testplugin_pi-1.0.328.0-darwin-wx32-arm64-x86_64-14.1-macos.xml

Lines changed: 0 additions & 26 deletions
This file was deleted.

metadata/testplugin_pi-1.0.328.0-debian-arm64-11-bullseye-arm64.xml

Lines changed: 0 additions & 26 deletions
This file was deleted.

metadata/testplugin_pi-1.0.328.0-debian-arm64-12-bookworm-arm64.xml

Lines changed: 0 additions & 26 deletions
This file was deleted.

metadata/testplugin_pi-1.0.328.0-debian-armhf-11-bullseye-armhf.xml

Lines changed: 0 additions & 26 deletions
This file was deleted.

metadata/testplugin_pi-1.0.328.0-debian-armhf-12-bookworm-armhf.xml

Lines changed: 0 additions & 26 deletions
This file was deleted.

metadata/testplugin_pi-1.0.328.0-debian-x86_64-11-bullseye.xml

Lines changed: 0 additions & 26 deletions
This file was deleted.

metadata/testplugin_pi-1.0.328.0-debian-x86_64-12-bookworm.xml

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)