Skip to content

Commit d773316

Browse files
BMouseren0
authored andcommitted
Adding install script and change exec default to bash (#2)
* Adding in install script * Changing default exec command to bash
1 parent e90303f commit d773316

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

README.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,8 @@ brew install kube-fzf
2525
### Manual
2626

2727
```
28-
git clone https://github.com/thecasualcoder/kube-fzf.git ~/.kube-fzf
29-
sudo ln -s ~/.kube-fzf/findpod /usr/local/bin/findpod
30-
sudo ln -s ~/.kube-fzf/execpod /usr/local/bin/execpod
31-
sudo ln -s ~/.kube-fzf/tailpod /usr/local/bin/tailpod
32-
sudo ln -s ~/.kube-fzf/deletepod /usr/local/bin/deletepod
33-
sudo ln -s ~/.kube-fzf/describepod /usr/local/bin/describepod
34-
sudo ln -s ~/.kube-fzf/pfpod /usr/local/bin/pfpod
35-
sudo ln -s ~/.kube-fzf/taildeploy /usr/local/bin/taildeploy
36-
sudo ln -s ~/.kube-fzf/findeploy /usr/local/bin/findeploy
37-
sudo ln -s ~/.kube-fzf/kube-fzf.sh /usr/local/bin/kube-fzf.sh
28+
git clone https://github.com/bmouser/kube-fzf.git ~/.kube-fzf
29+
./install.sh
3830
```
3931

4032
## Usage

install.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env bash
2+
CURRENT_FILE=$(basename $0)
3+
4+
BIN_PATH=${1:-${HOME}/bin}
5+
6+
for file in $(find . -maxdepth 1 -type f -executable ! -path "./${CURRENT_FILE}" -printf '%P\n'); do
7+
ln -fs "$(pwd)/${file}" "${BIN_PATH}/${file}"
8+
done

kube-fzf.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ _kube_fzf_handler() {
103103
if [ "$func" = "execpod" ] || [ "$func" = "pfpod" ]; then
104104
if [ $# -eq 1 ]; then
105105
cmd=$1
106-
[ -z "$cmd" ] && cmd="sh"
106+
[ -z "$cmd" ] && cmd="bash"
107107
elif [ $# -eq 2 ]; then
108108
pod_query=$1
109109
cmd=$2
@@ -117,7 +117,7 @@ _kube_fzf_handler() {
117117
else
118118
if [ -z "$cmd" ]; then
119119
if [ "$func" = "execpod" ]; then
120-
cmd="sh"
120+
cmd="bash"
121121
elif [ "$func" = "pfpod" ]; then
122122
echo "Port required." && _kube_fzf_usage "$func" && return 1
123123
fi

0 commit comments

Comments
 (0)