Created
May 20, 2015 19:03
-
-
Save yan-kisen/6856ecacdb3df74e6e74 to your computer and use it in GitHub Desktop.
Create Batch CQ5 Tags
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" | |
jcr:description="" | |
jcr:primaryType="cq:Tag" | |
jcr:title="DIRNAME" | |
sling:resourceType="cq/tagging/components/tag"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
n=1880 | |
max=2015 | |
while [ "$n" -le "$max" ]; do | |
echo $n | |
mkdir -p $n | |
cat content.xml.template > $n/.content.xml | |
sed -i '' 's/DIRNAME/'${n}'/g' $n/.content.xml | |
n=`expr "$n" + 1`; | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment