mirror of
https://github.com/palera1n/palera1n.git
synced 2026-10-21 09:47:01 +02:00
better log thing
This commit is contained in:
1 parent
357e143090
commit
1695a4ee02
1 file changed
+9
-12
+9
-12
@@ -1,7 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
mkdir -p logs
|
||||
set -e
|
||||
set -e
|
||||
|
||||
log="$(date +%T)"-"$(date +%F)"-"$(uname)"-"$(uname -r)".log
|
||||
cd logs
|
||||
touch "$log"
|
||||
cd ..
|
||||
|
||||
{
|
||||
|
||||
@@ -292,11 +297,7 @@ _exit_handler() {
|
||||
|
||||
if [ -d "logs" ]; then
|
||||
cd logs
|
||||
for file in *.log; do
|
||||
if [[ "$file" != "SUCCESS_"* ]] && [[ "$file" != "FAIL_"* ]]; then
|
||||
mv "$file" FAIL_${file}
|
||||
fi
|
||||
done
|
||||
mv "$log" FAIL_${log}
|
||||
cd ..
|
||||
fi
|
||||
|
||||
@@ -991,11 +992,7 @@ fi
|
||||
|
||||
if [ -d "logs" ]; then
|
||||
cd logs
|
||||
for file in *.log; do
|
||||
if [[ "$file" != "SUCCESS_"* ]] && [[ "$file" != "FAIL_"* ]]; then
|
||||
mv "$file" SUCCESS_${file}
|
||||
fi
|
||||
done
|
||||
mv "$log" SUCCESS_${log}
|
||||
cd ..
|
||||
fi
|
||||
|
||||
@@ -1009,4 +1006,4 @@ echo "Otherwise, press Do All in the settings section of the app"
|
||||
echo "If you have any issues, please join the Discord server and ask for help: https://dsc.gg/palera1n"
|
||||
echo "Enjoy!"
|
||||
|
||||
} | tee logs/"$(date +%T)"-"$(date +%F)"-"$(uname)"-"$(uname -r)".log
|
||||
} | tee logs/${log}
|
||||
Reference in new issue
Block a user