mirror of
https://github.com/nwg-piotr/nwg-drawer.git
synced 2024-08-16 17:20:22 +03:00
wait for binary to be released while installing
This commit is contained in:
parent
9e2bbf155c
commit
6f10951238
1
Makefile
1
Makefile
@ -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
|
||||
|
BIN
bin/nwg-drawer
BIN
bin/nwg-drawer
Binary file not shown.
@ -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)
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
Loading…
Reference in New Issue
Block a user