Add build number specifier
This commit is contained in:
parent
43ae8f730c
commit
90b95e6d2e
@ -25,7 +25,7 @@ UBI_PREFIX="chip"
|
|||||||
UBI_SUFFIX="ubi.sparse"
|
UBI_SUFFIX="ubi.sparse"
|
||||||
UBI_TYPE="400000-4000"
|
UBI_TYPE="400000-4000"
|
||||||
|
|
||||||
while getopts "sgpbhB:" opt; do
|
while getopts "sgpbhB:N:" opt; do
|
||||||
case $opt in
|
case $opt in
|
||||||
s)
|
s)
|
||||||
echo "== Server selected =="
|
echo "== Server selected =="
|
||||||
@ -47,6 +47,10 @@ while getopts "sgpbhB:" opt; do
|
|||||||
BRANCH="$OPTARG"
|
BRANCH="$OPTARG"
|
||||||
echo "== ${BRANCH} branch selected =="
|
echo "== ${BRANCH} branch selected =="
|
||||||
;;
|
;;
|
||||||
|
N)
|
||||||
|
CACHENUM="$OPTARG"
|
||||||
|
echo "== Build number ${CACHENUM} selected =="
|
||||||
|
;;
|
||||||
h)
|
h)
|
||||||
echo ""
|
echo ""
|
||||||
echo "== help =="
|
echo "== help =="
|
||||||
@ -75,8 +79,10 @@ function require_directory {
|
|||||||
|
|
||||||
function dl_probe {
|
function dl_probe {
|
||||||
|
|
||||||
CACHENUM=$(curl -s $DL_URL/$BRANCH/$FLAVOR/latest)
|
if [ -z $CACHENUM ]; then
|
||||||
|
CACHENUM=$(curl -s $DL_URL/$BRANCH/$FLAVOR/latest)
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ ! -d "$DL_DIR/$BRANCH-$FLAVOR-b${CACHENUM}" ]]; then
|
if [[ ! -d "$DL_DIR/$BRANCH-$FLAVOR-b${CACHENUM}" ]]; then
|
||||||
echo "== New image available =="
|
echo "== New image available =="
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user