File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -88,6 +88,14 @@ if [ -z "$PATTERN" ]; then
8888 exit 1
8989fi
9090
91+ for cmd in aws numfmt jq curl md5sum sha256sum; do
92+ if [ -z " $( command -v $cmd ) " ]; then
93+ echo -e " \e[31;40m[ERROR]\e[0m No $cmd command was detected. Please install it."
94+ exit 1
95+ fi
96+ done
97+
98+
9199WORKING_DIR=$( mktemp -d)
92100
93101echo " channel: $CHANNEL "
@@ -100,6 +108,27 @@ echo "repo_dir: $REPO_DIR"
100108export AWS_PAGER=" "
101109mkdir -p $WORKING_DIR
102110
111+ multipart_chunksize=$( aws configure get $PROFILE .s3.multipart_chunksize)
112+ multipart_threshold=$( aws configure get $PROFILE .s3.multipart_threshold)
113+ if [ -z " $multipart_chunksize " -o -z " $multipart_threshold " ]; then
114+ echo -e " \e[31;40m[ERROR]\e[0m s3.multipart_chunksize and s3.multipart_threshold must be set"
115+ exit 1
116+ fi
117+
118+ threshold_literal=" 50M"
119+ if [ $( echo $multipart_chunksize | sed ' s/B$//' | numfmt --from=iec) -lt $( numfmt --from=iec $threshold_literal ) ]; then
120+ echo -e " \e[31;40m[ERROR]\e[0m s3.multipart_chunksize <$multipart_chunksize > must be greater than <$threshold_literal >"
121+ exit 1
122+ else
123+ echo -e " \e[32;40m[PASS]\e[0m s3.multipart_chunksize <$multipart_chunksize > is greater than <$threshold_literal >"
124+ fi
125+ if [ $( echo $multipart_threshold | sed ' s/B$//' | numfmt --from=iec) -lt $( numfmt --from=iec $threshold_literal ) ]; then
126+ echo -e " \e[31;40m[ERROR]\e[0m s3.multipart_threshold <$multipart_threshold > must be greater than <$threshold_literal >"
127+ exit 1
128+ else
129+ echo -e " \e[32;40m[PASS]\e[0m s3.multipart_threshold <$multipart_threshold > is greater than <$threshold_literal >"
130+ fi
131+
103132for channel in $CHANNEL ; do
104133 echo " checking $channel "
105134 for pkg in $( find " $REPO_DIR /$channel " -name " $PATTERN " ) ; do
You can’t perform that action at this time.
0 commit comments