slic3r / Slic3r

Open Source toolpath generator for 3D printers
https://slic3r.org/
GNU Affero General Public License v3.0
3.34k stars 1.3k forks source link

Slic3r Automated development builds broken #3892

Closed kbm15 closed 7 years ago

kbm15 commented 7 years ago

All new files are empty in http://dl.slic3r.org/dev/win/

lordofhyphens commented 7 years ago

@alexrj We ran out of space on dl.slic3r.org

lordofhyphens commented 7 years ago

@alexrj For purposes of cron:

for i in $(ls -trl /path/to/folder/*.zip | awk '{print $9}' | head -n$(expr $(ls /path/to/folder/*.zip | wc -l) - 10)); do
    rm /path/to/folder/$i
done

will delete all but the 10 newest files ending in zip in /path/to/folder

Wrapping that in a script:

#!/bin/bash

FOLDER=$1
PATTERN=$2
COUNT=$3

for i in $(ls -trl $FOLDER/$PATTERN | awk '{print $9}' | head -n$(expr $(ls $FOLDER/$PATTERN | wc -l) - $COUNT)); 
do 
    rm -f $i; 
done

Usage: rmoldest.sh FOLDER 'PATTERN' COUNT Get cron to run that (probably weekly), and wrap the pattern in single quotes when you call it (so .zip -> '.zip')

For now I'd have cron execute it daily on each of the dev/ paths. and monthly on dev/*/branches

lordofhyphens commented 7 years ago

in gist form: https://gist.github.com/lordofhyphens/0acb46e9557e38d2c002f821e11c8bea