diff options
author | Márcio Alexandre Silva Delgado <coadde@lavabit.com> | 2013-07-17 05:19:48 -0300 |
---|---|---|
committer | Márcio Alexandre Silva Delgado <coadde@lavabit.com> | 2013-07-17 05:19:48 -0300 |
commit | 0a32dd5aab83123487e6988ec37e7e5385c3aef6 (patch) | |
tree | 760f093c15bf512361439acc7b998f04fdd0cb5b /libre/parabolaweb-utils/parabolaweb-download | |
parent | 7d3151cb257dcb2aeacf52bad5d96041677754a2 (diff) | |
parent | 201a3a8a986287b2f54d01e7c5e4bbeba8c37040 (diff) |
Merge branch 'master' of ssh://parabolagnulinux.org:1863/srv/git/abslibre
Diffstat (limited to 'libre/parabolaweb-utils/parabolaweb-download')
-rw-r--r-- | libre/parabolaweb-utils/parabolaweb-download | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/libre/parabolaweb-utils/parabolaweb-download b/libre/parabolaweb-utils/parabolaweb-download deleted file mode 100644 index e124295d4..000000000 --- a/libre/parabolaweb-utils/parabolaweb-download +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash - -. /etc/conf.d/parabolaweb -. /usr/bin/libremessages - -dir=$WEBDIR -repo=$GITURL -ref=$GITREF - -cd_safe() { - if ! cd "$1"; then - error "$(gettext "Failed to change to directory %s")" "$1" - plain "$(gettext "Aborting...")" - exit 1 - fi -} - -download_git() { - if [[ ! -d "$dir/.git" ]] ; then - msg2 "$(gettext "Cloning %s %s repo...")" "${repo}" "git" - if ! git clone "$repo" "$dir"; then - error "$(gettext "Failure while downloading %s %s repo")" "${repo}" "git" - plain "$(gettext "Aborting...")" - exit 1 - fi - else - cd_safe "$dir" - # Make sure we are fetching the right repo - if [[ "$repo" != "$(git config --get remote.origin.url)" ]] ; then - error "$(gettext "%s is not a clone of %s")" "$dir" "$repo" - plain "$(gettext "Aborting...")" - exit 1 - fi - msg2 "$(gettext "Updating %s %s repo...")" "${repo}" "git" - if ! git pull origin "$ref"; then - # only warn on failure to allow offline builds - warning "$(gettext "Failure while updating %s %s repo")" "${repo}" "git" - fi - fi -} - -main() { - [[ -d "${dir%/*}" ]] || mkdir -p "${dir%/*}" - download_git -} - -main "$@" |