summaryrefslogtreecommitdiffstats
path: root/VNF_Catalogue/cronjob/git_count_loc.sh
diff options
context:
space:
mode:
Diffstat (limited to 'VNF_Catalogue/cronjob/git_count_loc.sh')
-rwxr-xr-xVNF_Catalogue/cronjob/git_count_loc.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/VNF_Catalogue/cronjob/git_count_loc.sh b/VNF_Catalogue/cronjob/git_count_loc.sh
new file mode 100755
index 00000000..3b316666
--- /dev/null
+++ b/VNF_Catalogue/cronjob/git_count_loc.sh
@@ -0,0 +1,11 @@
+folder_name=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 13 ; echo '');
+
+git clone $1 $folder_name 2> /dev/null
+if [ "$?" -ne "0" ]; then
+ echo 0;
+ exit 1;
+fi
+cd $folder_name;
+(git ls-files | xargs cat | wc -l) 2> /dev/null;
+cd ../;
+rm -rf $folder_name;