Adds git-lfs as a dependency and initialises lfs in the repo

master
Jonathan Hodgson 4 years ago
parent dd1c39c79e
commit 4731545df5
  1. 10
      inc/init
  2. 1
      kb

@ -18,7 +18,15 @@ initKnowledgeBase(){
echo "/knowledgebase.sqlite3" >> "${dataDir}/.gitignore" echo "/knowledgebase.sqlite3" >> "${dataDir}/.gitignore"
git -C "$dataDir" add .gitignore > "$output" git -C "$dataDir" add .gitignore > "$output"
git -C "$dataDir" commit -m "Knowledge base initialised" > output git -C "$dataDir" commit -m "Knowledge base initialised" > "$output"
if type -p git-lfs; then
git -C "$dataDir" lfs install > "$output"
for i in "jpg" "jpeg" "gif" "png" "pdf"; do
git -C "$dataDir" lfs track "*.$i" > "$output"
done
git -C add .gitattributes
git commit -m "Initialises Git lfs"
fi
fi fi
initDB initDB
} }

1
kb

@ -112,6 +112,7 @@ checkDependencies(){
"git" "git"
"yq" "yq"
"bat" "bat"
"git-lfs"
) )
local ret=0 local ret=0
for program in "${dependencies[@]}"; do for program in "${dependencies[@]}"; do

Loading…
Cancel
Save