Skip to content

Commit

Permalink
indexschemas: initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
dericed committed Oct 26, 2015
1 parent cf9c21c commit 50eafc7
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions indexschemas
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

LTO_LOGS="${HOME}/Documents/lto_indexes"

renameschemas -u

for LTO_SCHEMA in "${LTO_LOGS}/"*.schema ; do
LTO_ID=$(basename "${LTO_SCHEMA%.*}")
LTO_INDEX="${LTO_LOGS}/${LTO_ID}.txt"
if [ "${LTO_SCHEMA}" -nt "${LTO_INDEX}" ] ; then
echo "Updating index for ${LTO_ID}."
xml sel -t -m ".//file" -m "ancestor-or-self::directory" -v "name" -o "/" -b -v name -n "$i" | grep -v "/metadata/\|/access/\|/trimmed_materials/" > "${LTO_INDEX}"
fi
done

0 comments on commit 50eafc7

Please sign in to comment.