Commit b505e0f8 authored by Stefan's avatar Stefan

Initial commit

parents
Pipeline #44 skipped
#!/bin/bash
Logfile="/home/stefan/bot2.log"
d=`date +%Y-%m-%d-%H-%M`
function setSymlink {
unlink stable
lastFW=`ls -ltr | grep '^d' | tail -1| awk '{print $NF}'`
echo "$d - set stable symlink" >> $Logfile
ln -s $lastFW stable
}
function generateChecksum {
find "$PWD" -type d | sort | while read dir;
do
cd "${dir}";
ls | grep -v "*/*" | egrep gluon- | egrep -v "(*md5|*sha1|*sha2)" | sort | while read file;
do
echo "$d - Creating MD5 checksum for" $file "..." >> $Logfile
md5sum $file > "$file.md5"
echo "$d - Creating SHA1 checksum for" $file "..." >> $Logfile
sha1sum $file > "$file.sha1"
echo "$d - Creating SHA2 checksum for" $file "..." >> $Logfile
sha512sum $file > "$file.sha2"
done
done
}
generateChecksum
setSymlink
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment