Skip to content
Permalink
Browse files

simplify install script, add post install instructions

  • Loading branch information...
technocake committed May 16, 2019
1 parent 472bf13 commit 38efc65928be1c6d115d8928ac0137ace8813f5c
Showing with 75 additions and 129 deletions.
  1. +1 −1 MANIFEST.in
  2. +10 −0 POST_INSTALL_INSTRUCTIONS.txt
  3. +58 −0 bin/install_goto
  4. +0 −128 install.sh
  5. +6 −0 setup.py
@@ -1,3 +1,3 @@
include README.md
include POST_INSTALL_INSTRUCTIONS.txt
include goto/*.py
include bin
@@ -0,0 +1,10 @@
Congratulations - you got goto!

Now there is one last step to let it do it's magic, always.


run this command:
install_goto


(Or you could manually add this to your .rc file: source start_goto)
@@ -0,0 +1,58 @@
#!/bin/bash
. _gotoutils # load common utils



echo Step 1: Setting up magic data folder in ${HOME}/.goto
MAGICPATH="${HOME}/.goto"
if [[ ! -d "$MAGICPATH" ]]; then
mkdir "${HOME}/.goto" || check_status
mkdir "${HOME}/.goto/projects" || check_status
touch "${HOME}/.goto/active-project" || check_status
fi


echo Step 2: add goto startup script to bash config file
if [ -f "${HOME}/.bash_profile" ]; then
echo
echo "Next step is required to make goto work:"
echo

if prompt "Add goto startup script to .bash_profile? [y|n]: "; then
echo
echo "source start_goto" >> "${HOME}/.bash_profile" || check_status
else
echo
echo "If you want to do this manually add the line 'source start_goto' to your .bash_profile"
fi
else
echo "~/.bash_profile does not exist"
echo
echo "To make goto function properly, add this line to your bash config file: "
echo
echo " source start_goto"
echo
echo "into one of these (.bashrc | .profile | .bash_profile)"

if prompt "Want to append to .bashrc? [y|n]: "; then
echo "source start_goto" >> "${HOME}/.bashrc" || check_status
fi

fi


# make goto ready -- now.
source start_goto || check_status

# add your first project
project add goto || check_status

# set the context to this project
project goto || check_status

# add your first shortcuts
goto add goto https://github.com/technocake/goto || check_status
goto add github https://github.com/technocake/goto || check_status


echo Installation Succesful!

This file was deleted.

@@ -3,6 +3,10 @@
with open("README.md", "r") as fh:
long_description = fh.read()

with open("POST_INSTALL_INSTRUCTIONS.txt", "r") as fh:
post_install_instructions = fh.read()


setuptools.setup(
name="goto",
version="1.3.0",
@@ -18,6 +22,7 @@
'bin/project',
'bin/_gotoutils',
'bin/start_goto',
'bin/install_goto',
],
entry_points={
'console_scripts': ['the_real_goto.py=goto.the_real_goto:main']
@@ -29,3 +34,4 @@
],
)

print(post_install_instructions)

0 comments on commit 38efc65

Please sign in to comment.
You can’t perform that action at this time.