Improve asciinema-log stuff
This commit is contained in:
parent
3bb298526b
commit
c2f56a9d3f
3 changed files with 11 additions and 3 deletions
|
@ -19,7 +19,7 @@ then
|
|||
if [ "$ASCIINEMA_LOG" = "video" ]
|
||||
then
|
||||
export ASCIINEMA_LOG_FILE="$ASCIINEMA_LOG_DIR/asciinema-$_file_name_date.cast"
|
||||
asciinema rec --quiet --idle-time-limit=3 "$ASCIINEMA_LOG_FILE"
|
||||
asciinema rec --quiet --idle-time-limit=3 -t "Terminal log on $_file_name_date" "$ASCIINEMA_LOG_FILE"
|
||||
exit 0 # Parent script should exit
|
||||
fi
|
||||
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
echo "Running user-cleaner..."
|
||||
|
||||
# clean old logs
|
||||
log_dir="$HOME/.cache/logs"
|
||||
[ -d "$log_dir" ] \
|
||||
&& find "$log_dir" -type f -mtime +7 -delete
|
||||
if [ -d "$log_dir" ]
|
||||
then
|
||||
echo "Cleaning old logs..."
|
||||
find "$log_dir" -type f -mtime +7 -delete
|
||||
find "$log_dir" -type f -mtime +1 -size -25k -delete
|
||||
fi
|
||||
|
|
|
@ -124,3 +124,5 @@ source source-remote-file \
|
|||
[ -x "$(command -v starship)" ] && eval "$(starship init zsh)"
|
||||
|
||||
asciinema-log && exit
|
||||
|
||||
true # Don't start with 1 as exit code
|
||||
|
|
Loading…
Reference in a new issue