dk: bug avec la synchro d'un fichier
This commit is contained in:
parent
74190f7264
commit
f4f9b69257
17
dk
17
dk
|
@ -719,7 +719,6 @@ function build_update_apps() {
|
|||
|
||||
DEST="${var}_DEST"; DEST="${!DEST}"
|
||||
[ -n "$DEST" ] || DEST="$app/b"
|
||||
mkdir -p "$DEST" || { eend; return 1; }
|
||||
|
||||
ORIGIN="${var}_${PROFILE}_ORIGIN"; ORIGIN="${!ORIGIN}"
|
||||
[ -n "$ORIGIN" ] || { ORIGIN="${var}_ORIGIN"; ORIGIN="${!ORIGIN}"; }
|
||||
|
@ -733,6 +732,7 @@ function build_update_apps() {
|
|||
TYPE="${var}_TYPE"; TYPE="${!TYPE}"
|
||||
|
||||
if [ -n "$BUILD_UPDATE_DEVEL" ]; then
|
||||
mkdir -p "$DEST" || { eend; return 1; }
|
||||
DEST="$DEST/$app"
|
||||
|
||||
# synchronisation en mode devel
|
||||
|
@ -760,6 +760,7 @@ function build_update_apps() {
|
|||
done
|
||||
fi
|
||||
elif [ -n "$URL" ]; then
|
||||
mkdir -p "$DEST" || { eend; return 1; }
|
||||
DEST="$DEST/$app"
|
||||
|
||||
if [ -d "$DEST" -a -d "$DEST/.git" ]; then
|
||||
|
@ -789,12 +790,20 @@ function build_update_apps() {
|
|||
elif [ -n "$SRC" ]; then
|
||||
if [ -d "$SRC" ]; then
|
||||
local -a rsync_opts; rsync_opts=(-a --delete --exclude .git/ --delete-excluded)
|
||||
estep "Synchro $SRC/ --> $DEST"
|
||||
rsync "${rsync_opts[@]}" "$SRC/" "$DEST/" || { eend; return 1; }
|
||||
SRC="${SRC%/}/"
|
||||
DEST="${DEST%/}/"
|
||||
estep "Synchro $SRC --> $DEST"
|
||||
rsync "${rsync_opts[@]}" "$SRC" "$DEST" || { eend; return 1; }
|
||||
elif [ -f "$SRC" ]; then
|
||||
local -a rsync_opts; rsync_opts=(-a)
|
||||
if [ "${DEST%/}" != "$DEST" -o -d "$DEST" ]; then
|
||||
DEST="${DEST%/}/"
|
||||
estep "Synchro $SRC --> $DEST"
|
||||
rsync "${rsync_opts[@]}" "$SRC" "$DEST/" || { eend; return 1; }
|
||||
rsync "${rsync_opts[@]}" "$SRC" "$DEST" || { eend; return 1; }
|
||||
else
|
||||
estep "Synchro $SRC --> $DEST"
|
||||
rsync "${rsync_opts[@]}" "$SRC" "$DEST" || { eend; return 1; }
|
||||
fi
|
||||
else
|
||||
eerror "$app: $SRC: répertoire/fichier introuvable"
|
||||
eend; return 1
|
||||
|
|
Loading…
Reference in New Issue