|
191 | 191 |
|
192 | 192 | if [[ "$TYPE" == "stable" ]]; then
|
193 | 193 | # get only one latest packages of each type from the alpha repo
|
194 |
| - packets=$(aptly -config=$CONF_FILE mirror search boinc-alpha-mirror | grep -o '[^[:space:]]*_\([[:digit:]]*\.\)\{2\}[[:digit:]]*-\([[:digit:]]*_\)[^[:space:]]*' | sort -t '_' -k 2 -V -r | uniq) |
195 |
| - declare -A split_lists |
196 |
| - packets_list=() |
| 194 | + alpha_packets=$(aptly -config=$CONF_FILE mirror search boinc-alpha-mirror | grep -o '[^[:space:]]*_\([[:digit:]]*\.\)\{2\}[[:digit:]]*-\([[:digit:]]*_\)[^[:space:]]*' | sort -t '_' -k 2 -V -r | uniq) |
| 195 | + declare -A alpha_split_lists |
| 196 | + alpha_packets_list=() |
197 | 197 | while IFS= read -r line; do
|
198 |
| - packets_list+=("$line") |
199 |
| - done <<< "$packets" |
200 |
| - for item in "${packets_list[@]}"; do |
| 198 | + alpha_packets_list+=("$line") |
| 199 | + done <<< "$alpha_packets" |
| 200 | + for item in "${alpha_packets_list[@]}"; do |
201 | 201 | prefix="${item%%_*}" # Extract the prefix (text before the first underscore)
|
202 |
| - split_lists["$prefix"]+="$item"$'\n' # Append the item to the corresponding prefix's list |
| 202 | + alpha_split_lists["$prefix"]+="$item"$'\n' # Append the item to the corresponding prefix's list |
203 | 203 | done
|
204 |
| - for prefix in "${!split_lists[@]}"; do |
| 204 | + for prefix in "${!alpha_split_lists[@]}"; do |
205 | 205 | echo "List for prefix: $prefix"
|
206 |
| - echo "${split_lists[$prefix]}" |
207 |
| - values_list=() |
| 206 | + echo "${alpha_split_lists[$prefix]}" |
| 207 | + alpha_values_list=() |
208 | 208 | while IFS= read -r line; do
|
209 |
| - values_list+=("$line") |
210 |
| - done <<< "${split_lists[$prefix]}" |
211 |
| - for value in "${values_list[@]}"; do |
| 209 | + alpha_values_list+=("$line") |
| 210 | + done <<< "${alpha_split_lists[$prefix]}" |
| 211 | + for value in "${alpha_values_list[@]}"; do |
212 | 212 | # copy the latest package to the local repo
|
| 213 | + echo "Adding: $value" |
213 | 214 | aptly -config=$CONF_FILE repo import boinc-alpha-mirror boinc-$TYPE $value
|
214 | 215 | break
|
215 | 216 | done
|
|
0 commit comments