From b990cad369e7b7d72bc496536d5d041f960b28fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikl=C3=B3s=20T=C3=B3th?= <tothmiklostibor@gmail.com> Date: Mon, 10 May 2021 01:58:11 +0200 Subject: [PATCH] fix --- docs/linecounter.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/linecounter.sh b/docs/linecounter.sh index 1a55af78..990cbae0 100755 --- a/docs/linecounter.sh +++ b/docs/linecounter.sh @@ -4,7 +4,7 @@ if [ "$0" != "/tmp/lines/linecount.sh" ]; then mkdir -p /tmp/lines cp "$0" /tmp/lines/linecount.sh cd "$(dirname "$0")" || exit 1 - cd ../src || exit 1 + cd .. || exit 1 exec /tmp/lines/linecount.sh fi @@ -15,13 +15,13 @@ hash="$(git rev-parse HEAD)" for week in w6 w10 w13; do echo "week $week incoming..." git clean -fd - git checkout "w${week}" + git checkout "${week}" curr=$(wc -l $(find src -name "*.java") | grep total | awk '{print $1}') echo "$curr" > "/tmp/lines/$week" total=$(("$total" + "$curr")) - git reset --hard "w${week}" + git reset --hard "${week}" done echo "$total" > /tmp/lines/total -- GitLab