wait for binary to be released while installing
This commit is contained in:
1
Makefile
1
Makefile
@@ -13,6 +13,7 @@ build:
|
|||||||
|
|
||||||
install:
|
install:
|
||||||
-pkill -f nwg-drawer
|
-pkill -f nwg-drawer
|
||||||
|
sleep 1
|
||||||
mkdir -p /usr/share/nwg-drawer
|
mkdir -p /usr/share/nwg-drawer
|
||||||
cp -r desktop-directories /usr/share/nwg-drawer
|
cp -r desktop-directories /usr/share/nwg-drawer
|
||||||
cp drawer.css /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
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
log "github.com/sirupsen/logrus"
|
||||||
|
|
||||||
"github.com/fsnotify/fsnotify"
|
"github.com/fsnotify/fsnotify"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -19,12 +20,12 @@ func watchFiles() {
|
|||||||
defer watcher.Close()
|
defer watcher.Close()
|
||||||
|
|
||||||
if err := watcher.Add(pinnedFile); err != nil {
|
if err := watcher.Add(pinnedFile); err != nil {
|
||||||
fmt.Println("ERROR", err)
|
log.Errorf("ERROR", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, fp := range appDirs {
|
for _, fp := range appDirs {
|
||||||
if err := filepath.Walk(fp, watchDir); err != nil {
|
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:
|
case err := <-watcher.Errors:
|
||||||
fmt.Println("ERROR", err)
|
log.Errorf("ERROR", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|||||||
Reference in New Issue
Block a user