Browse Source

Use upstream slop repo in 'main' mode

Alois Mahdal 6 years ago
parent
commit
d021ec70d2
1 changed files with 11 additions and 1 deletions
  1. 11
    1
      trigger_copr

+ 11
- 1
trigger_copr View File

96
     esac
96
     esac
97
 }
97
 }
98
 
98
 
99
+choose_urlbase() {
100
+    #
101
+    # Choose COPR project based on $Mode
102
+    #
103
+    case $Mode in
104
+        scratch) echo https://github.com/AloisMahdal/slop ;;
105
+        main)    echo https://github.com/naelstrof/slop ;;
106
+    esac
107
+}
108
+
99
 choose_relpfx() {
109
 choose_relpfx() {
100
     #
110
     #
101
     # Choose COPR project based on $Mode
111
     # Choose COPR project based on $Mode
115
     local Mode=scratch  # implies COPR project and release prefix
125
     local Mode=scratch  # implies COPR project and release prefix
116
     which copr >/dev/null \
126
     which copr >/dev/null \
117
      || die "copr not found, try 'sudo install copr-cli'"
127
      || die "copr not found, try 'sudo install copr-cli'"
118
-    UrlBase=https://github.com/AloisMahdal/slop
119
     Tmp=$(mktemp -d)
128
     Tmp=$(mktemp -d)
120
     while true; do case $1 in
129
     while true; do case $1 in
121
         -b) Branch=$2;      shift 2 || usage ;;
130
         -b) Branch=$2;      shift 2 || usage ;;
133
         *)            usage ;;
142
         *)            usage ;;
134
     esac
143
     esac
135
     test -n "$CoprProject" || CoprProject=$(choose_copr)
144
     test -n "$CoprProject" || CoprProject=$(choose_copr)
145
+    test -n "$UrlBase"     || UrlBase=$(choose_urlbase)
136
     if test -n "$Branch"; then
146
     if test -n "$Branch"; then
137
         die "not implemented"
147
         die "not implemented"
138
         test -n "$Version" || Version=$(git_guess ver)
148
         test -n "$Version" || Version=$(git_guess ver)