You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

13 lines
603 B

#!/bin/bash
# ! Не используйте это, если не понимаете, как оно работает.
apt update -y && apt install -y inotify-tools && apt clean
inotifywait -m /build/iso -e close_write |
while read path action file; do
echo "The file '$file' appeared in directory '$path' via '$action'"
if [ $action != "CREATE,ISDIR" ]; then
xhost + >/dev/null 2>/dev/null
#find $path ! -name "$file" -type f -exec rm -f {""} +
cp $path$file /mnt/build/iso/minios.iso
mv $path$file /mnt/build/iso/
fi
done