From b34f7377da6603b3eac7295695cd93728a05d80a Mon Sep 17 00:00:00 2001 From: Maarten Billemont Date: Mon, 19 Jan 2015 20:58:53 -0500 Subject: [PATCH] Handle dependencies unpacked by a package manager. --- MasterPassword/C/build | 19 +++++++++++++------ Site/2013-05/sync | 2 +- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/MasterPassword/C/build b/MasterPassword/C/build index b2f58d8d..736aa82d 100755 --- a/MasterPassword/C/build +++ b/MasterPassword/C/build @@ -81,11 +81,15 @@ unpack() { mv "$files"/* . rmdir "$files" fi + touch .unpacked } fetchSource() ( source .source - if [[ $pkg && -e "${pkg##*/}" ]]; then + if [[ -e .unpacked ]]; then + true + + elif [[ $pkg && -e "${pkg##*/}" ]]; then files=( !("${pkg##*/}") ) [[ -e $files ]] || { echo @@ -135,11 +139,14 @@ fetchSource() ( exit 1 fi - for patch in "${patches[@]}"; do - echo - echo "Patching: ${PWD##*/}, for $patch..." - patch -p0 < ../"${PWD##*/}-$patch.patch" - done + if [[ ! -e .patched ]] && (( ${#patches[@]} )); then + for patch in "${patches[@]}"; do + echo + echo "Patching: ${PWD##*/}, for $patch..." + patch -p0 < ../"${PWD##*/}-$patch.patch" + done + touch .patched + fi ) depend() { diff --git a/Site/2013-05/sync b/Site/2013-05/sync index 7dafe47e..0aa09492 100755 --- a/Site/2013-05/sync +++ b/Site/2013-05/sync @@ -3,4 +3,4 @@ set -e cd "${BASH_SOURCE[0]%/*}" s3cmd sync --exclude '.git/**' --delete-removed --follow-symlinks --preserve --acl-public --reduced-redundancy . s3://masterpasswordapp.com/ -rsync -avP --no-group . satura.lyndir.com:/usr/local/www/masterpasswordapp.com/htdocs-secure/ +rsync -avPL --no-group . satura.lyndir.com:/usr/local/www/masterpasswordapp.com/htdocs-secure/