1
0

ajout d'une commande log

This commit is contained in:
unfr
2025-02-03 23:25:38 +01:00
parent 4120f07133
commit c05c09fb4a
3 changed files with 18 additions and 2 deletions

View File

@@ -129,6 +129,14 @@ do_status() {
echo -e "${ROUGE}${GRAS}■■■■■■${NORMAL} : ERREUR"
}
do_showlog() {
release_name="$2"
if [[ "${release_name}" =~ \.(mkv|mp4)$ ]]; then
release_name="${release_name%.*}"
fi
cat ${DOSSIER_LOGS}${release_name}.log
}
do_createdb() {
if [ -f "$DB_FILE" ]; then
@@ -168,6 +176,13 @@ case "$1" in
;;
createdb)
do_createdb
;;
log)
if [ -z "$2" ]; then
echo "Usage: $0 add <release_path>"
exit 1
fi
do_showlog "$@"
;;
add)
if [ -z "$2" ]; then