Skip to content

Commit

Permalink
Fix publish script (flame-engine#849)
Browse files Browse the repository at this point in the history
  • Loading branch information
spydon authored Jun 17, 2021
1 parent 676d34a commit f81bfc6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,14 @@ for i in "${!packages[@]}"; do
printf "%s\t%s\n" "$(expr $i + 1)" "${packages[$i]}"
done

while [[ ! " ${!packages[@]} " =~ " $choice " ]]; do
choice=-1
while [[ "$choice" -gt "${#packages[@]}" || "$choice" -le "0" ]]; do
read -n 1 -r -p "Enter a number: " choice
printf "\n"
done

upgrade_package=${packages[$(expr $choice - 1)]}
choice=$((choice-1))
upgrade_package="${packages[$choice]}"
echo -en "You have chosen to publish $yellow$bold$upgrade_package$endcolor, is this correct? (y/N): "
read -n 1 -r
if [[ ! $REPLY =~ ^[Yy]$ ]]
Expand Down

0 comments on commit f81bfc6

Please sign in to comment.