Change bash to sh for cross compatibility and add brewinstall rule to Makefile
This commit is contained in:
parent
c1917b0aac
commit
9a311a233a
5
Makefile
5
Makefile
@ -23,3 +23,8 @@ pacinstall: plugins/pacman/pak.cfg pak
|
||||
aptitude: plugins/aptitude/pak.cfg pak
|
||||
install -Dm644 plugins/aptitude/pak.cfg $(DESTDIR)/etc/pak.cfg
|
||||
install -Dm755 pak $(DESTDIR)/usr/bin/pak
|
||||
|
||||
brewinstall: plugins/brew/pak.cfg pak
|
||||
mount -uw /
|
||||
install -m644 plugins/brew/pak.cfg $(DESTDIR)/etc/pak.cfg
|
||||
install -m755 pak $(DESTDIR)/usr/bin/pak
|
8
pak.go
8
pak.go
@ -244,7 +244,7 @@ func main() {
|
||||
if useRootBool {
|
||||
cmdArr := []string{rootCommand, packageManagerCommand, similarTo[0], strings.Join(args[1:], " ")}
|
||||
cmdStr := strings.Join(cmdArr, " ")
|
||||
command := exec.Command("bash", "-c", cmdStr)
|
||||
command := exec.Command("sh", "-c", cmdStr)
|
||||
command.Stdout = os.Stdout
|
||||
command.Stdin = os.Stdin
|
||||
command.Stderr = os.Stderr
|
||||
@ -256,7 +256,7 @@ func main() {
|
||||
} else {
|
||||
cmdArr :=[]string{packageManagerCommand, similarTo[0], strings.Join(args[1:], " ")}
|
||||
cmdStr := strings.Join(cmdArr, " ")
|
||||
command := exec.Command("bash", "-c", cmdStr)
|
||||
command := exec.Command("sh", "-c", cmdStr)
|
||||
command.Stdout = os.Stdout
|
||||
command.Stdin = os.Stdin
|
||||
command.Stderr = os.Stderr
|
||||
@ -275,7 +275,7 @@ func main() {
|
||||
if useRootBool {
|
||||
cmdArr :=[]string{rootCommand, packageManagerCommand, similarTo[0]}
|
||||
cmdStr := strings.Join(cmdArr, " ")
|
||||
command := exec.Command("bash", "-c", cmdStr)
|
||||
command := exec.Command("sh", "-c", cmdStr)
|
||||
command.Stdout = os.Stdout
|
||||
command.Stdin = os.Stdin
|
||||
command.Stderr = os.Stderr
|
||||
@ -287,7 +287,7 @@ func main() {
|
||||
} else {
|
||||
cmdArr :=[]string{packageManagerCommand, similarTo[0]}
|
||||
cmdStr := strings.Join(cmdArr, " ")
|
||||
command := exec.Command("bash", "-c", cmdStr)
|
||||
command := exec.Command("sh", "-c", cmdStr)
|
||||
command.Stdout = os.Stdout
|
||||
command.Stdin = os.Stdin
|
||||
command.Stderr = os.Stderr
|
||||
|
Loading…
Reference in New Issue
Block a user