File tree 1 file changed +11
-6
lines changed
1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -14,13 +14,18 @@ if [ "$#" -ne "4" ]; then
14
14
exit
15
15
fi
16
16
17
- REPO=" https://cloudsmith.io/~$3 /repos/"
18
- echo " Issuing command: wget -q -O - $REPO $1 -$4 /packages/?q=*$2 *.xml"
17
+ NAME=" $1 "
18
+ VERSION=" $2 "
19
+ USER=" $3 "
20
+ LEVEL=" $4 "
21
+
22
+ REPO=" https://cloudsmith.io/~${USER} /repos/"
23
+ echo " Issuing command: wget -q -O - $REPO ${NAME} -${LEVEL} /packages/?q=*${VERSION} *.xml"
19
24
my_array=()
20
25
echo " Show current files that match criteria"
21
- ls metadata/$1 * - $2 * xml -la
26
+ ls metadata/${NAME} * - * ${VERSION} * xml -la
22
27
echo " Deleting current files that match criteria"
23
- rm metadata/$1 * - $2 * xml
28
+ rm metadata/${NAME} * - * ${VERSION} * xml
24
29
echo " Finding files on remote cloudsmith repository"
25
30
delimiter=" href=\" "
26
31
delimiter1=" .xml\" title"
@@ -35,7 +40,7 @@ while read -r line; do
35
40
my_array+=( $line );
36
41
echo " found: $line "
37
42
fi
38
- done < <( wget -q -O - " $REPO $1 - $4 /packages/?q=*$2 *xml" )
43
+ done < <( wget -q -O - " $REPO ${NAME} - ${LEVEL} /packages/?q=*${VERSION} *xml+tag:latest&page_size=50 " )
39
44
40
45
echo " Downloading files found that match criteria"
41
46
for URL in " ${my_array[@]} "
44
49
wget --progress=bar:force:noscroll -c $URL -P metadata
45
50
done
46
51
echo " Files downloaded"
47
- ls -l metadata/$1 * - $2 * xml
52
+ ls -la metadata/${NAME} * - * ${VERSION} * xml
48
53
You can’t perform that action at this time.
0 commit comments