Use globs, set nullglob, and remove stdout redirection for import

This commit is contained in:
rhy-jot
2013-11-20 15:40:17 -08:00
parent d11f732595
commit e8037da726
5 changed files with 9 additions and 5 deletions

View File

@@ -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

View File

@@ -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