mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-01-18 02:39:30 +00:00
cleanup: remove trailing spaces in prepare.sh
Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
parent
1cb2eef010
commit
fe738e9d9f
24
prepare.sh
24
prepare.sh
@ -1,5 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e -o pipefail
|
||||||
|
|
||||||
# In case no value is specified, default values will be used.
|
# In case no value is specified, default values will be used.
|
||||||
gitrepo="https://github.com/ceph/ceph-csi"
|
gitrepo="https://github.com/ceph/ceph-csi"
|
||||||
workdir="tip/"
|
workdir="tip/"
|
||||||
@ -21,38 +23,38 @@ ret=$?
|
|||||||
|
|
||||||
if [ ${ret} -ne 0 ]
|
if [ ${ret} -ne 0 ]
|
||||||
then
|
then
|
||||||
echo "Try '--help' for more information."
|
echo "Try '--help' for more information."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
eval set -- ${opts}
|
eval set -- "${opts}"
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
case "${1}" in
|
case "${1}" in
|
||||||
--help)
|
--help)
|
||||||
shift
|
shift
|
||||||
echo "Options:"
|
echo "Options:"
|
||||||
echo "--help|-h specify the flags"
|
echo "--help|-h specify the flags"
|
||||||
echo "--ref specify the reference of pr"
|
echo "--ref specify the reference of pr"
|
||||||
echo "--workdir specify the working directory"
|
echo "--workdir specify the working directory"
|
||||||
echo "--gitrepo specify the git repository"
|
echo "--gitrepo specify the git repository"
|
||||||
echo " "
|
echo " "
|
||||||
echo "Sample Usage:"
|
echo "Sample Usage:"
|
||||||
echo "./prepare.sh --gitrepo=https://github.com/example --workdir=/opt/build --ref=pull/123/head"
|
echo "./prepare.sh --gitrepo=https://github.com/example --workdir=/opt/build --ref=pull/123/head"
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
--gitrepo)
|
--gitrepo)
|
||||||
shift
|
shift
|
||||||
gitrepo=${1}
|
gitrepo=${1}
|
||||||
;;
|
;;
|
||||||
--workdir)
|
--workdir)
|
||||||
shift
|
shift
|
||||||
workdir=${1}
|
workdir=${1}
|
||||||
;;
|
;;
|
||||||
--ref)
|
--ref)
|
||||||
shift
|
shift
|
||||||
ref=${1}
|
ref=${1}
|
||||||
echo ${ref}
|
echo "${ref}"
|
||||||
;;
|
;;
|
||||||
--)
|
--)
|
||||||
shift
|
shift
|
||||||
@ -66,7 +68,7 @@ set -x
|
|||||||
|
|
||||||
yum -y install git podman
|
yum -y install git podman
|
||||||
|
|
||||||
git clone --depth=1 ${gitrepo} ${workdir}
|
git clone --depth=1 "${gitrepo}" "${workdir}"
|
||||||
cd ${workdir}
|
cd "${workdir}"
|
||||||
git fetch --depth=1 origin "${ref}:tip/${ref}"
|
git fetch --depth=1 origin "${ref}:tip/${ref}"
|
||||||
git checkout "tip/${ref}"
|
git checkout "tip/${ref}"
|
||||||
|
Loading…
Reference in New Issue
Block a user