Skip to content

Commit 36748d3

Browse files
committed
use find to count files
1 parent 13224c9 commit 36748d3

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

scripts/deploy-nginx.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,21 @@ ssh $REMOTE_HOST "cd $REMOTE_PATH && \
1919
echo 'List before clearing:' && \
2020
ls && \
2121
echo 'Count before clearing:' && \
22-
ls -l | grep -v ^l | wc -l && \
22+
find . -type f | wc -l && \
2323
2424
# Only possible to skip with rsync --delete
25-
# echo 'Clearing contents of the folder...' && \
26-
# rm -rf * && \
27-
# echo 'List after clearing:' && \
28-
# ls && \
29-
# echo 'Count after clearing:' && \
30-
# ls -l | grep -v ^l | wc -l && \
25+
echo 'Clearing contents of the folder...' && \
26+
rm -rf * && \
27+
echo 'List after clearing:' && \
28+
ls && \
29+
echo 'Count after clearing:' && \
30+
find . -type f | wc -l && \
3131
3232
echo 'Copying new contents...'"
3333

3434
# Copy new contents, 320 MB
3535
# Using scp -rq, slowest, not resumable
36-
# scp -r $LOCAL_PATH/* $REMOTE_HOST:$REMOTE_PATH
36+
# scp -rq $LOCAL_PATH/* $REMOTE_HOST:$REMOTE_PATH
3737

3838
# Using rsync, fastest, resumable, deletes without clearing, lot faster with reusing unchanged files (--delete)
3939
rsync -az --delete --info=stats2,progress2 $LOCAL_PATH/ $REMOTE_HOST:$REMOTE_PATH
@@ -46,7 +46,7 @@ ssh $REMOTE_HOST "cd $REMOTE_PATH && \
4646
echo 'List after copying:' && \
4747
ls && \
4848
echo 'Count after copying:' && \
49-
ls -l | grep -v ^l | wc -l"
49+
find . -type f | wc -l"
5050

5151

5252

0 commit comments

Comments
 (0)