Commit 9e65069e4e90dbcd20886b5cee4e8d3eb1c802b2
1 parent
5167ede2
Exists in
master
and in
5 other branches
Experimenting with zypper ar.
Showing
1 changed file
with
35 additions
and
0 deletions
Show diff stats
win/pack.sh
@@ -426,6 +426,36 @@ makeInstaller() | @@ -426,6 +426,36 @@ makeInstaller() | ||
426 | } | 426 | } |
427 | 427 | ||
428 | # | 428 | # |
429 | +# Add repos | ||
430 | +# | ||
431 | +addRepos() { | ||
432 | + | ||
433 | + for ARCH in ${TARGET_ARCHS} | ||
434 | + do | ||
435 | + case ${ARCH} in | ||
436 | + x86_32) | ||
437 | + # https://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_Leap_15.1/windows:mingw:win32.repo | ||
438 | + REPO_ARCH="win32" | ||
439 | + ;; | ||
440 | + | ||
441 | + x86_64) | ||
442 | + # https://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_Leap_15.1/windows:mingw:win64.repo | ||
443 | + REPO_ARCH="win64" | ||
444 | + ;; | ||
445 | + | ||
446 | + *) | ||
447 | + failed "Arquitetura desconhecida: ${ARCH}" | ||
448 | + | ||
449 | + esac | ||
450 | + | ||
451 | + | ||
452 | + echo zypper ar "https://download.opensuse.org/repositories/windows:/mingw:/${REPO_ARCH}/$(echo ${PRETTY_NAME} | sed "s@ @_@g")" ${REPO_ARCH} | ||
453 | + | ||
454 | + done | ||
455 | + | ||
456 | +} | ||
457 | + | ||
458 | +# | ||
429 | # Check command line parameters | 459 | # Check command line parameters |
430 | # | 460 | # |
431 | until [ -z "$1" ] | 461 | until [ -z "$1" ] |
@@ -449,6 +479,11 @@ do | @@ -449,6 +479,11 @@ do | ||
449 | PRODUCT_NAME=${value} | 479 | PRODUCT_NAME=${value} |
450 | ;; | 480 | ;; |
451 | 481 | ||
482 | + ADD-REPOS) | ||
483 | + addRepos | ||
484 | + exit 0 | ||
485 | + ;; | ||
486 | + | ||
452 | CLEAR) | 487 | CLEAR) |
453 | if [ -d ~/public_html/win/${PRODUCT_NAME} ]; then | 488 | if [ -d ~/public_html/win/${PRODUCT_NAME} ]; then |
454 | rm -fr ~/public_html/win/${PRODUCT_NAME}/{x86_32,x86_64} | 489 | rm -fr ~/public_html/win/${PRODUCT_NAME}/{x86_32,x86_64} |