wait for binary to be released while installing

This commit is contained in:
piotr 2021-09-29 22:41:44 +02:00
parent 9e2bbf155c
commit 6f10951238
3 changed files with 6 additions and 4 deletions

View File

@ -13,6 +13,7 @@ build:
install:
-pkill -f nwg-drawer
sleep 1
mkdir -p /usr/share/nwg-drawer
cp -r desktop-directories /usr/share/nwg-drawer
cp drawer.css /usr/share/nwg-drawer

Binary file not shown.

View File

@ -1,11 +1,12 @@
package main
import (
"fmt"
"os"
"path/filepath"
"strings"
log "github.com/sirupsen/logrus"
"github.com/fsnotify/fsnotify"
)
@ -19,12 +20,12 @@ func watchFiles() {
defer watcher.Close()
if err := watcher.Add(pinnedFile); err != nil {
fmt.Println("ERROR", err)
log.Errorf("ERROR", err)
}
for _, fp := range appDirs {
if err := filepath.Walk(fp, watchDir); err != nil {
fmt.Println("ERROR", err)
log.Errorf("ERROR", err)
}
}
@ -44,7 +45,7 @@ func watchFiles() {
}
case err := <-watcher.Errors:
fmt.Println("ERROR", err)
log.Errorf("ERROR", err)
}
}
}()