Skip to content

Commit f35c651

Browse files
committed
no need to copy into another file
1 parent 0760ad7 commit f35c651

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tests/scripts/ptc.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,9 @@ sed --in-place '/^\/\/ NOLINTNEXTLINE(readability-identifier-naming)$/d' ../libr
3030
chmod +x ../library/contest/hash.sh
3131
for header in ../library/**/*.hpp; do
3232
echo "$header"
33-
cp "$header" input
34-
lines="$(wc -l <input)"
33+
lines="$(wc -l <$header)"
3534
for i in $(seq "$lines" -5 1); do
36-
hash=$(head -n "$i" input | sed '/^#include/d' | cpp -dD -P -fpreprocessed | ./../library/contest/hash.sh)
35+
hash=$(head -n "$i" "$header" | sed '/^#include/d' | cpp -dD -P -fpreprocessed | ./../library/contest/hash.sh)
3736
sed -i "${i}s/$/\/\/${hash}/" "$header"
3837
done
3938
done

0 commit comments

Comments
 (0)