One of the little annoyances of Gnu Arch is that it does not add files and directories recursively. Not to worry, though. Here is a little shell script that can assist with that task:
#!/bin/bash
# Find all files and directories, skipping ./{arch}
for FILE in `find . -path './{arch}' -prune -o -print`
do
# Get rid of the leading ./
FILE=`echo $FILE | sed -e 's/\.\///'`
tla add "$FILE"
done
Skipping the script itself is left as an exercise to the reader.
Update: Simplier method indeed is
tla inventory --source --names | xargs tla add
One thought on “Recursively adding files and directories in Gnu Arch”