diff options
author | Alexander Sulfrian <alex@spline.inf.fu-berlin.de> | 2015-02-07 15:27:36 +0100 |
---|---|---|
committer | Alexander Sulfrian <alex@spline.inf.fu-berlin.de> | 2015-02-07 15:27:36 +0100 |
commit | 94e4aa9be5f4bbb8fb80978474e0490fa389101f (patch) | |
tree | af8f84ab22457c83c090085f52f7492fde50640f | |
parent | bab0b84e0026ce34523c11e9284ffc835ded21fe (diff) | |
download | bcfg2-tools-94e4aa9be5f4bbb8fb80978474e0490fa389101f.tar.gz bcfg2-tools-94e4aa9be5f4bbb8fb80978474e0490fa389101f.tar.bz2 bcfg2-tools-94e4aa9be5f4bbb8fb80978474e0490fa389101f.zip |
prepare-repository: Allow to prepary arbitrary directories.
-rwxr-xr-x | prepare-repository | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/prepare-repository b/prepare-repository index 6c09bf9..c418699 100755 --- a/prepare-repository +++ b/prepare-repository @@ -2,10 +2,15 @@ . settings.sh +DIR="$REPO" +if [ -n "$1" -a -d "$1" ]; then + DIR="$1" +fi + # update symlinks (needed for repo validation) -ln -sf "$REAL/Probes/probed.xml" "$REPO/Probes/probed.xml" -ln -sf "$REAL/Properties/secrets.xml" "$REPO/Properties/secrets.xml" +ln -sf "$REAL/Probes/probed.xml" "$DIR/Probes/probed.xml" +ln -sf "$REAL/Properties/secrets.xml" "$DIR/Properties/secrets.xml" # update directory symlinks (with --no-dereference) -ln -sfn "$REAL/Packages/cache" "$REPO/Packages/cache" -ln -sfn "$REAL/SSL/private" "$REPO/SSL/private" +ln -sfn "$REAL/Packages/cache" "$DIR/Packages/cache" +ln -sfn "$REAL/SSL/private" "$DIR/SSL/private" |