Skip to content

Instantly share code, notes, and snippets.

@yan-kisen
Forked from asabaylus/vlt add remove
Last active December 1, 2017 08:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yan-kisen/8fe14f8d2de98cd723dcf7c26c8e183d to your computer and use it in GitHub Desktop.
Save yan-kisen/8fe14f8d2de98cd723dcf7c26c8e183d to your computer and use it in GitHub Desktop.
Useful commands for working with Adobe CQ5 VLT
# remove from CRX all files deleted from file system
$ vlt st | grep ! | cut -c 2- | xargs -I {} vlt rm {}
# add to CRX all files not yet in vlt control
$ vlt st | grep \? | cut -c 2- | xargs -I {} vlt add {}
# add all missing files into the CRX
vlt st | grep ^A | cut -c 2- | xargs -I {} vlt commit --force {}
# copy all modified files into the CRX
vlt st | grep ^M | cut -c 2- | xargs -I {} vlt commit --force {}
# delete all deleted files from the CRX
vlt st | grep ^D | cut -c 2- | xargs -I {} vlt commit --force {}
# strip .vlt files from all directories below the current dir
find . -name "*.vlt" -exec rm -rf {} \;
# setup vlt
# navigate to jcr_root
cd .../ui/src/main/content/jcr_root
# checkout files
vlt --credentials admin:admin co --force http://localhost:4502/crx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment