mirror of
https://github.com/ehang-io/nps.git
synced 2026-11-01 01:02:12 +08:00
fix update
This commit is contained in:
1 parent
076fc8b2e1
commit
0b5c903d89
1 file changed
+4
-2
@@ -91,11 +91,13 @@ func copyStaticFile(srcPath, bin string) string {
|
|||||||
if _, err := copyFile(filepath.Join(srcPath, bin), "/usr/local/bin/"+bin); err != nil {
|
if _, err := copyFile(filepath.Join(srcPath, bin), "/usr/local/bin/"+bin); err != nil {
|
||||||
log.Fatalln(err)
|
log.Fatalln(err)
|
||||||
} else {
|
} else {
|
||||||
copyFile(filepath.Join(srcPath, "nps"), "/usr/local/bin/"+bin+"-update")
|
copyFile(filepath.Join(srcPath, bin), "/usr/local/bin/"+bin+"-update")
|
||||||
|
chMod("/usr/local/bin/"+bin+"-update", 0755)
|
||||||
binPath = "/usr/local/bin/" + bin
|
binPath = "/usr/local/bin/" + bin
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
copyFile(filepath.Join(srcPath, "nps"), "/usr/bin/"+bin+"-update")
|
copyFile(filepath.Join(srcPath, bin), "/usr/bin/"+bin+"-update")
|
||||||
|
chMod("/usr/bin/"+bin+"-update", 0755)
|
||||||
binPath = "/usr/bin/" + bin
|
binPath = "/usr/bin/" + bin
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in new issue
Block a user