Commits

Nicola Paolucci committed 7abaa0b

security checks about readding projects

Comments (0)

Files changed (1)

 tags=$@
 entry="$(date +%Y-%m-%d)-$project_name"
 
+mkdir -p log
 if [[ -z $(find ./log -type d -depth 1 | grep $project_name) ]];
   then
-    git submodule add $repo_url ./log/$entry
+    git submodule add -f $repo_url ./log/$entry
   else
     echo project $project_name already added.
 fi
 
 for tag in $tags; do 
   mkdir -p $tag
-  ln -s ./log/$entry ./$tag/$entry
+  if [[ -z $(find ./$tag -type d -depth 1 | grep $project_name) && -e ./log/$entry ]];
+    then
+      ln -s ../log/$entry ./$tag/$entry
+    else
+      echo project $project_name already linked in $tag or non existent.
+  fi
 done