archive-logs

Iteratively archive newline separated log files

git clone https://git.8pit.net/archive-logs.git

 1#!/bin/sh
 2. "${0%/*}/common.sh"
 3
 4for dir in current current-expected archive-expected; do
 5	mkdir -p "${dir}/subdir1" "${dir}/subdir2"
 6done
 7
 8# Ensure that it dosen't error out on existing directories
 9mkdir -p archive/subdir2
10
11cat >current/subdir1/file1 <<-EOF
12	foo
13	foobar
14EOF
15
16cat >current-expected/subdir1/file1 <<-EOF
17	foobar
18EOF
19
20cat >archive-expected/subdir1/file1 <<-EOF
21	foo
22EOF
23
24run_test