Mercurial > hg > cc > cirrus_home
annotate bin/doPlinks.sh @ 3:cbd13beb0922
only create links file if there are some
| author | Henry Thompson <ht@markup.co.uk> |
|---|---|
| date | Tue, 18 Feb 2020 22:41:08 +0000 |
| parents | a4b0359456bc |
| children | 0f494c76a887 |
| rev | line source |
|---|---|
| 0 | 1 #!/usr/bin/bash |
|
1
a4b0359456bc
switch to file loop inside python, assume file index integer in pipe as well as filename, check /dev/shm/stopJob
Henry Thompson <ht@markup.co.uk>
parents:
0
diff
changeset
|
2 mkdir -p /dev/shm/x |
|
a4b0359456bc
switch to file loop inside python, assume file index integer in pipe as well as filename, check /dev/shm/stopJob
Henry Thompson <ht@markup.co.uk>
parents:
0
diff
changeset
|
3 plinks.py $1 |
|
a4b0359456bc
switch to file loop inside python, assume file index integer in pipe as well as filename, check /dev/shm/stopJob
Henry Thompson <ht@markup.co.uk>
parents:
0
diff
changeset
|
4 # while read f |
|
a4b0359456bc
switch to file loop inside python, assume file index integer in pipe as well as filename, check /dev/shm/stopJob
Henry Thompson <ht@markup.co.uk>
parents:
0
diff
changeset
|
5 # do |
|
a4b0359456bc
switch to file loop inside python, assume file index integer in pipe as well as filename, check /dev/shm/stopJob
Henry Thompson <ht@markup.co.uk>
parents:
0
diff
changeset
|
6 # if plinks.py $f > /dev/shm/x/links_${me}_${mine} 2>/dev/null |
|
a4b0359456bc
switch to file loop inside python, assume file index integer in pipe as well as filename, check /dev/shm/stopJob
Henry Thompson <ht@markup.co.uk>
parents:
0
diff
changeset
|
7 # then |
|
a4b0359456bc
switch to file loop inside python, assume file index integer in pipe as well as filename, check /dev/shm/stopJob
Henry Thompson <ht@markup.co.uk>
parents:
0
diff
changeset
|
8 # ((mine+=1)) |
|
a4b0359456bc
switch to file loop inside python, assume file index integer in pipe as well as filename, check /dev/shm/stopJob
Henry Thompson <ht@markup.co.uk>
parents:
0
diff
changeset
|
9 # else |
|
a4b0359456bc
switch to file loop inside python, assume file index integer in pipe as well as filename, check /dev/shm/stopJob
Henry Thompson <ht@markup.co.uk>
parents:
0
diff
changeset
|
10 # echo $f >> /dev/shm/x/badpdfs_$me |
|
a4b0359456bc
switch to file loop inside python, assume file index integer in pipe as well as filename, check /dev/shm/stopJob
Henry Thompson <ht@markup.co.uk>
parents:
0
diff
changeset
|
11 # rm -f /dev/shm/x/links_${me}_${mine} |
|
a4b0359456bc
switch to file loop inside python, assume file index integer in pipe as well as filename, check /dev/shm/stopJob
Henry Thompson <ht@markup.co.uk>
parents:
0
diff
changeset
|
12 # fi |
|
a4b0359456bc
switch to file loop inside python, assume file index integer in pipe as well as filename, check /dev/shm/stopJob
Henry Thompson <ht@markup.co.uk>
parents:
0
diff
changeset
|
13 # done |
| 0 | 14 rsync -a /dev/shm/x/ links |
