Skip to content

Commit

Permalink
bazi fonksiyonlara yorum eklendi.
Browse files Browse the repository at this point in the history
  • Loading branch information
pleycpl committed Oct 7, 2017
1 parent 748e7b1 commit a941cb4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions shellscript/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -241,17 +241,22 @@ function update() {
# method1 $teachername
method2 $teachername
done
# Update(-u) komutundan sonra Control(-c) komutunu da calistirmaliyiz.
# Cunku update komutunda sadece yeni gelen dosyalarin listesini filelist.txt dosyasina kaydediyoruz.
# Sonrasinda control komutuyla filelist.txt de bulunan ama dizinde bulunmayan dosyalari indiriyoruz.
delete_tmp_files
}

function method2() {
# Bu methodta updatefilelist.txt deki pathleri ve linkleri, guncel olmayan dosyanin sonuna ekliyoruz.
local teachername=$1
local teacherpath=~/$SETUPPATH/$teachername
cat $teacherpath/updatefilelist.txt >> $teacherpath/filelist.txt
make_unique_lines_teacher $teachername
}

function make_unique_lines_teacher() {
# Burda hocanin filelist.txt dosyasinda bulunan satirlarini siralayip, unique linelari birakiyoruz.
local teachername=$1
local teacherpath=~/$SETUPPATH/$teachername
sort $teacherpath/filelist.txt \
Expand Down

0 comments on commit a941cb4

Please sign in to comment.