-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
54 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
BASEDIR=$(dirname $0) | ||
echo "cleanup : $BASEDIR/../out" | ||
rm $BASEDIR/../out/* | ||
echo "build:go" | ||
go build -o $BASEDIR/../out/shell-butler $BASEDIR/../main.go | ||
echo "cp: binary" | ||
#mkdir -p $BASEDIR/../package/debian/shell-butler/usr/local/bin | ||
mkdir -p $BASEDIR/../package/debian/shell-butler/opt/shell-butler/bin | ||
cp $BASEDIR/../run $BASEDIR/../package/debian/shell-butler/opt/shell-butler/bin/shell-butler-run | ||
cp $BASEDIR/../out/shell-butler $BASEDIR/../package/debian/shell-butler/opt/shell-butler/bin | ||
echo "run: dpkg-deb" | ||
dpkg-deb --build $BASEDIR/../package/debian/shell-butler $BASEDIR/../out/shell-butler.deb | ||
echo "done" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Package: shell-butler | ||
Version: 1.0.2 | ||
Section: custom | ||
Priority: optional | ||
Architecture: all | ||
Essential: no | ||
Installed-Size: 1024 | ||
Maintainer: Vinod S R <[email protected]> | ||
Description: Your butler to run frequent commands in linux |
Binary file not shown.
22 changes: 22 additions & 0 deletions
22
package/debian/shell-butler/opt/shell-butler/bin/shell-butler-run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
SCRIPT=`realpath $0` | ||
BASEDIR=$(dirname $SCRIPT) | ||
if [ "$1" = "add" ]; then | ||
${BASEDIR}/shell-butler $* | ||
else | ||
|
||
result=$(${BASEDIR}/shell-butler $*) | ||
ret=$? | ||
|
||
echo -e "\U1F916 Hey" | ||
if [ $ret -eq 0 ]; then | ||
echo | ||
echo -e "\U1F3C3 : $result" | ||
echo | ||
eval $result | ||
else | ||
echo | ||
echo -e "\U2757 You haven't selected any command" | ||
echo | ||
fi | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#Run using the current shell context | ||
source "/opt/shell-butler/bin/shell-butler-run" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,22 @@ | ||
BASEDIR=$(dirname $0) | ||
#!/bin/bash | ||
SCRIPT=`realpath $0` | ||
BASEDIR=$(dirname $SCRIPT) | ||
if [ "$1" = "add" ]; then | ||
shell-butler $* | ||
${BASEDIR}/shell-butler $* | ||
else | ||
|
||
result=$(shell-butler $*) | ||
result=$(${BASEDIR}/shell-butler $*) | ||
ret=$? | ||
|
||
echo "\U1F916 Hey" | ||
echo -e "\U1F916 Hey" | ||
if [ $ret -eq 0 ]; then | ||
echo | ||
echo "\U1F3C3 : $result" | ||
echo -e "\U1F3C3 : $result" | ||
echo | ||
eval $result | ||
else | ||
echo | ||
echo "\U2757 You haven't selected any command" | ||
echo -e "\U2757 You haven't selected any command" | ||
echo | ||
fi | ||
fi |