File tree Expand file tree Collapse file tree 4 files changed +9
-9
lines changed Expand file tree Collapse file tree 4 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -67,16 +67,16 @@ if [[ ! "${SUPPORTED_BITBUCKET_VERSIONS[*]}" =~ ${BITBUCKET_VERSION} ]]; then
6767 echo " e.g. ./populate_db.sh --force 6.10.0"
6868 echo " !!! Warning !!! This may break your Bitbucket instance. Also, note that downgrade is not supported by Bitbucket."
6969 # Check if --force flag is passed into command
70- if [[ " $1 " == " --force " ]]; then
70+ if [[ ${force} == 1 ]]; then
7171 # Check if version was specified after --force flag
72- if [[ -z " $2 " ]]; then
72+ if [[ -z ${version} ]]; then
7373 echo " Error: --force flag requires version after it."
7474 echo " Specify one of these versions: ${SUPPORTED_BITBUCKET_VERSIONS[*]} "
7575 exit 1
7676 fi
7777 # Check if passed Bitbucket version is in list of supported
78- if [[ " ${SUPPORTED_BITBUCKET_VERSIONS[@]} " =~ " ${2 } " ]]; then
79- DB_DUMP_URL=" ${DATASETS_AWS_BUCKET} /$2 /${DATASETS_SIZE} /${DB_DUMP_NAME} "
78+ if [[ " ${SUPPORTED_BITBUCKET_VERSIONS[@]} " =~ " ${version } " ]]; then
79+ DB_DUMP_URL=" ${DATASETS_AWS_BUCKET} /${version} /${DATASETS_SIZE} /${DB_DUMP_NAME} "
8080 echo " Force mode. Dataset URL: ${DB_DUMP_URL} "
8181 else
8282 LAST_DATASET_VERSION=${SUPPORTED_BITBUCKET_VERSIONS[${#SUPPORTED_BITBUCKET_VERSIONS[@]} -1]}
Original file line number Diff line number Diff line change @@ -50,10 +50,10 @@ if [[ ! "${SUPPORTED_BITBUCKET_VERSIONS[*]}" =~ ${BITBUCKET_VERSION} ]]; then
5050 echo " e.g. ./upload_attachments --force 6.10.0"
5151 echo " !!! Warning !!! This may broke your Bitbucket instance."
5252 # Check if --force flag is passed into command
53- if [[ " $1 " == " --force " ]]; then
53+ if [[ ${force} == 1 ]]; then
5454 # Check if passed Bitbucket version is in list of supported
55- if [[ " ${SUPPORTED_BITBUCKET_VERSIONS[*]} " =~ ${2 } ]]; then
56- ATTACHMENTS_TAR_URL=" ${DATASETS_AWS_BUCKET} /$2 /${DATASETS_SIZE} /${ATTACHMENTS_TAR} "
55+ if [[ " ${SUPPORTED_BITBUCKET_VERSIONS[*]} " =~ ${version } ]]; then
56+ ATTACHMENTS_TAR_URL=" ${DATASETS_AWS_BUCKET} /${version} /${DATASETS_SIZE} /${ATTACHMENTS_TAR} "
5757 echo " Force mode. Dataset URL: ${ATTACHMENTS_TAR_URL} "
5858 else
5959 LAST_DATASET_VERSION=${SUPPORTED_BITBUCKET_VERSIONS[${#SUPPORTED_BITBUCKET_VERSIONS[@]} -1]}
Original file line number Diff line number Diff line change 7373
7474echo " Step1: Download msrcync"
7575# https://github.com/jbd/msrsync
76- cd ${TMP_DIR} || exit
76+ cd ${TMP_DIR} || exit 1
7777if [[ -s msrsync ]]; then
7878 echo " msrsync already downloaded"
7979else
Original file line number Diff line number Diff line change 107107
108108echo " Step1: Download msrcync"
109109# https://github.com/jbd/msrsync
110- cd ${TMP_DIR}
110+ cd ${TMP_DIR} || exit 1
111111if [[ -s msrsync ]]; then
112112 echo " msrsync already downloaded"
113113else
You can’t perform that action at this time.
0 commit comments