Skip to content

Commit

Permalink
write to zshrc as that is the default in macosx now
Browse files Browse the repository at this point in the history
  • Loading branch information
jharshman committed May 17, 2023
1 parent ae66d27 commit 9d54f7a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
11 changes: 7 additions & 4 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh
# Installs FWSYNC release.

VERSION="v0.0.1-1"
OS=$(uname -s | tr -d '\n')
Expand All @@ -8,17 +9,19 @@ RELEASE=https://github.com/jharshman/fwsync/releases/download/${VERSION}/fwsync_
# install
mkdir -p $HOME/.local/bin
wget $RELEASE
tar -zxvf -C $HOME/.local/bin/ fwsync_${OS}_${ARCH}
tar -C $HOME/.local/bin/ --exclude README.md -zxvf fwsync_${OS}_${ARCH}.tar.gz
chmod +x $HOME/.local/bin/fwsync

# update PATH
echo "export PATH=$HOME/.local/bin:$PATH" >> $HOME/.bashrc
# update PATH if required.
if grep -q '# ADDED BY FWSYNC'; then
echo "export PATH=\$HOME/.local/bin:\$PATH # ADDED BY FWSYNC" >> $HOME/.zshrc
fi

cat <<EOM
/////////////
// FWSYNC has been installed at $HOME/.local/bin/fwsync
//
// Your PATH has been updated in .bashrc.
// Your PATH has been updated in .zshrc.
// Restart your Terminal for the changes to take effect.
///////////////////////////////////////////////////////////
EOM
5 changes: 0 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package main

import (
"flag"
"fmt"
"os"

Expand All @@ -10,10 +9,6 @@ import (
"github.com/spf13/cobra"
)

func init() {
flag.Parse()
}

func main() {

rootCmd := &cobra.Command{
Expand Down

0 comments on commit 9d54f7a

Please sign in to comment.