diff options
Diffstat (limited to 'deploy-to-obs.sh')
-rwxr-xr-x | deploy-to-obs.sh | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/deploy-to-obs.sh b/deploy-to-obs.sh index 25ef954..e0ddd87 100755 --- a/deploy-to-obs.sh +++ b/deploy-to-obs.sh @@ -19,12 +19,16 @@ dsc_file="$( find . -maxdepth 1 -name 'gtk+3.0_*dsc' -printf '%T@ %f\n' | sort - debian_tar_file="$( find . -maxdepth 1 -name 'gtk+3.0_*debian*z' -printf '%T@ %f\n' | sort -n -k1 | awk '{print $NF}' | tail -n1 | cut -d' ' -f2 )" # prep obs -cd "${obsdir}" -osc up -osc rm * -cd "${projectdir}" -cp -p "${dsc_file}" "${debian_tar_file}" "${tf}" "${obsdir}/" -cd "${obsdir}" -find . -mindepth 1 -maxdepth 1 ! -name '.osc' ! -name "${dsc_file}" ! -name "${debian_tar_file}" ! -name "${tf}" -delete -osc add * -osc commit # will prompt for commit name +if ! cd "${obsdir}" ; +then + printf "%s\n" "Fatal! This depends on ${obsdir} being prepared first with \`cd ~/dev/osc ; osc checkout home:bgstack15:gtk3-classic gtk3-classic\`" 1>&2 +else + osc up + osc rm * + cd "${projectdir}" + cp -p "${dsc_file}" "${debian_tar_file}" "${tf}" "${obsdir}/" + cd "${obsdir}" + find . -mindepth 1 -maxdepth 1 ! -name '.osc' ! -name "${dsc_file}" ! -name "${debian_tar_file}" ! -name "${tf}" -delete + osc add * + osc commit # will prompt for commit name +fi |