Skip to content

Commit 6de8371

Browse files
committed
git-import-srpm: Add -f option to force import
This option sets the variable FORCE_IMPORT to 1 to force srpm import if the branches already exist. Signed-off-by: Thierry Escande <thierry.escande@vates.tech>
1 parent 90fa2d4 commit 6de8371

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎scripts/git-import-srpm‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,19 @@ set -o pipefail
3535
THIS_SCRIPT="$(readlink -f "$0")"
3636

3737
function usage() {
38-
echo "Usage: $(basename "${THIS_SCRIPT}") [-c CODE_REPO_PATH] [-s SRPM_REPO_PATH] REVISION"
38+
echo "Usage: $(basename "${THIS_SCRIPT}") [-c CODE_REPO_PATH] [-s SRPM_REPO_PATH] [-f] REVISION"
3939
exit "${1}"
4040
}
4141

42-
while getopts ":c:s:h" opt; do
42+
while getopts ":c:s:fh" opt; do
4343
case "${opt}" in
4444
c)
4545
CODE_REPO_PATH="${OPTARG}"
4646
;;
4747
s)
4848
SRPM_REPO_PATH="${OPTARG}"
49+
f)
50+
FORCE_IMPORT=1
4951
;;
5052
h|*)
5153
if [ "${opt}" = "h" ]; then usage 0; else usage 1; fi

0 commit comments

Comments
 (0)