Create target if it does not exist, II
[mirror/dsa-puppet.git] / modules / roles / files / static-mirroring / static-master-update-component
index 64bca49..197044f 100755 (executable)
@@ -29,7 +29,7 @@
 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-componentlist=/home/staticsync/etc/static-components
+componentlist=/etc/static-components.conf
 base=/home/staticsync/static-master/master
 
 set -e
@@ -85,8 +85,8 @@ if [ -z "$srchost" ] || [ -z "$srcdir" ]; then
 fi
 tgt="$base/$component"
 if ! [ -d "$tgt" ]; then
-  echo >&2 "$0: Invalid component: $component ($tgt does not exist)";
-  exit 1
+  echo "$0: Creating $tgt for $component";
+  mkdir "$tgt"
 fi
 
 if [ "$srchost" = "`hostname -f`" ]; then