mirror of
https://github.com/dokku/dokku.git
synced 2025-12-29 00:25:08 +01:00
Use globs, set nullglob, and remove stdout redirection for import
This commit is contained in:
@@ -57,7 +57,7 @@ set -e; case "$1" in
|
||||
TARGET_DIR="$DOKKU_ROOT"
|
||||
|
||||
# create all the app directories
|
||||
while read app; do mkdir "$TARGET_DIR/$app"; echo "Imported $app"; done < $BACKUP_TMP_DIR/.dokku_backup_apps > /dev/null
|
||||
while read app; do mkdir "$TARGET_DIR/$app"; echo "Imported $app"; done < $BACKUP_TMP_DIR/.dokku_backup_apps
|
||||
|
||||
# have the plugins import their stuff
|
||||
pluginhook backup-import $VERSION "$BACKUP_ROOT" $TARGET_DIR "$BACKUP_TMP_DIR/.dokku_backup_apps"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
shopt -s nullglob
|
||||
VERSION="$1"
|
||||
BASE_DIR="$2"
|
||||
|
||||
cat; find $BASE_DIR -regex ".*/ENV"
|
||||
cat; for i in $BASE_DIR/*/ENV; do echo $i; done
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
shopt -s nullglob
|
||||
VERSION="$1"
|
||||
IMPORT_DIR="$2"
|
||||
TARGET_DIR="$3"
|
||||
|
||||
cd $IMPORT_DIR
|
||||
for file in `find . -regex ".*/ENV"`; do
|
||||
for file in */ENV; do
|
||||
cp $file "$TARGET_DIR/$file"
|
||||
done
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
shopt -s nullglob
|
||||
VERSION="$1"
|
||||
BASE_DIR="$2"
|
||||
|
||||
cat; find $BASE_DIR -regex ".*ssl/server\(.crt\|.key\)";
|
||||
cat; for i in $BASE_DIR/*/ssl/server.*; do echo $i; done
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
shopt -s nullglob
|
||||
VERSION="$1"
|
||||
IMPORT_DIR="$2"
|
||||
TARGET_DIR="$3"
|
||||
|
||||
cd $IMPORT_DIR
|
||||
|
||||
for file in `find . -regex ".*ssl/server\(.crt\|.key\)"`; do
|
||||
for file in */ssl/server.*; do
|
||||
mkdir -p $(dirname $TARGET_DIR$file)
|
||||
cp $file $TARGET_DIR$file
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user