# config # ; VERSION = v0 # # This is the director file for $ENC_DIR_NAME/$REPO_CONFIG_FILE_NAME # This file can be used to describe strategies to encrypt and/or scramble and decrypt and/or descramble: # Editee -> Key # 1) File contents -> Filename from the working tree repo root # 2) File name -> Filename from the working tree repo root # 3) Commit messages -> # 4) Author Name -> # 5) Author email -> # The readonly section of this file gets generated at the time of repo initialisation and must not be changed. # Note: quotes or double-quotes in filenames is not supported in v0 style config ################################################# Read only part starts ######################################################################################## ################################################# DO NOT CHANGE ################################################################################################ # Sections that do not start and/or end with angle brackets or are enclosed within angle brackets # as , , etc are assumed to be sections that are reserved for filenames. # and then the section key is the file path from the repo root. [.enc/config] enc-file=enc manip randomize 10 io --per-line < "%F" | enc manip randomize 10 io | enc manip offset 2 io --per-line | gpg -ac --passphrase-file "%K" --batch | enc manip randomize 10 io | enc manip randomize 10 io --per-line dec-file=enc manip randomize 10 io --per-line -i < "%F" | enc manip randomize 10 io -i | gpg -ad --passphrase-file "%K" --batch | enc manip offset 2 io -i --per-line | enc manip randomize 10 io -i | enc manip randomize 10 io -i --per-line enc-file-name=echo "%F" | sed "s,/,/sx-xyx/le/,g" | enc manip randomize 18 io --per-line | awk -v prefix='.' '{print prefix$0}' dec-file-name=echo "%F" | cut -d '.' -f2- | enc manip randomize 18 io --per-line -i | sed "s,/sx-xyx/le/,/,g" # Multiple files can be specified by separating filenames by a | to indicate ORed pattern. [.enc/.config|.enc/local.config] enc-file=cat "%F" dec-file=cat "%F" enc-file-name=echo "%F" dec-file-name=echo "%F" [.enc/profile.sh] enc-file=enc manip randomize 10 io --per-line < "%F" | enc manip randomize 10 io | enc manip offset 2 io --per-line | gpg -ac --passphrase-file "%K" --batch | enc manip randomize 10 io | enc manip randomize 10 io --per-line dec-file=enc manip randomize 10 io --per-line -i < "%F" | enc manip randomize 10 io -i | gpg -ad --passphrase-file "%K" --batch | enc manip offset 2 io -i --per-line | enc manip randomize 10 io -i | enc manip randomize 10 io -i --per-line enc-file-name=echo "%F" | enc manip randomize 10 io --per-line | sed "s,/,x/x/x,g" | enc manip offset 10 io --per-line dec-file-name=echo "%F" | enc manip offset 10 io --per-line -i | sed "s,x/x/x,/,g" | enc manip randomize 10 io --per-line -i [.enc/.gitignore] enc-file=cat $ENC_HOME/$SAMPLE_DIR/$CONFIG_VERSION/process-stage.gitignore dec-file=cat $ENC_HOME/$SAMPLE_DIR/$CONFIG_VERSION/working-tree.gitignore enc-file-name=echo "%F" dec-file-name=echo "%F" ################################################ Read only part ends ########################################################################################### ########################################################### Samples for user ################################################################################### ########################################################## All filenames should be specified from repo root #################################################### # Files separated by spaces can be provided # Files starting and/or ending with space/spaces are not yet supported #[ spaced file ]: #enc-file=enc manip randomize 10 io --per-line < "%F" | enc manip randomize 10 io | enc manip offset 2 io --per-line | gpg -ac --passphrase-file "%K" --batch | enc manip randomize 10 io | enc manip randomize 10 io --per-line #dec-file=enc manip randomize 10 io --per-line -i < "%F" | enc manip randomize 10 io -i | gpg -ad --passphrase-file "%K" --batch | enc manip offset 2 io -i --per-line | enc manip randomize 10 io -i | enc manip randomize 10 io -i --per-line #enc-file-name=echo "%F" | enc manip randomize 18 io --per-line | awk -v prefix='.' '{print prefix$0}' | sed "s,//,/x/x,g" #dec-file-name=echo "%F" | sed "s,/x/x,//,g" | cut -d '.' -f2- | enc manip randomize 18 io --per-line -i # DEFAULT # For any other files which are not tracked for encryption # The * pattern will match any file and can be used to provide generic encryption+scrambling # As this pattern is treated as the default pattern hence, this pattern must always be at the end of the config file [*] enc-file=cat "%F" # Simply no need to encrypt and/or scramble the files that do not match any of the previous patterns. The cat command here simply reads the provided file and processes it as-is in the process stage dec-file=cat "%F" # Since the file is not encrypted and/or scrambled in the enc-file key hence, there is no need to decrypt and/or descramble the file. The cat command here simply reads the provided file and processes it as-in in the working tree enc-file-name=echo "%F" # Simply no need to scramble filename. The echo command here only outputs the filename for the processed file to be named same as the original filename in the process stage dec-file-name=echo "%F" # Simply no need to descramble filename as it was not previously scrambled in the enc-file-name key. The echo command here only outputs the filename for the processed file to be named same as the original filename in the working tree.