installation improvements

pull/58/head
Simon Let 6 years ago
parent 3ec3135799
commit 52b50c7891
  1. 21
      scripts/install.sh
  2. 8
      scripts/rawinstall.sh

@ -78,8 +78,11 @@ else
fi
echo
echo "Continue with installation? (Any key to CONTINUE / Ctrl+C to ABORT)"
# echo
# echo "Continue with installation? (Any key to CONTINUE / Ctrl+C to ABORT)"
# # shellcheck disable=2034
# read -r x
echo
echo "Creating directories ..."
@ -104,7 +107,7 @@ cp -f conf/config.toml ~/.config/resh.toml
cp -f scripts/shellrc.sh ~/.resh/shellrc
cp -f scripts/reshctl.sh scripts/widgets.sh scripts/hooks.sh scripts/util.sh ~/.resh/
echo "Generating completions for reshctl ..."
echo "Generating completions ..."
bin/resh-control completion bash > ~/.resh/bash_completion.d/_reshctl
bin/resh-control completion zsh > ~/.resh/zsh_completion.d/_reshctl
@ -119,14 +122,19 @@ cp -fr data/sanitizer ~/.resh/sanitizer_data
echo "Finishing up ..."
# Adding resh shellrc to .bashrc ...
if [ ! -f ~/.bashrc ]; then
touch ~/.bashrc
fi
grep -q '[[ -f ~/.resh/shellrc ]] && source ~/.resh/shellrc' ~/.bashrc ||\
echo -e '\n[[ -f ~/.resh/shellrc ]] && source ~/.resh/shellrc' >> ~/.bashrc
# Adding bash-preexec to .bashrc ...
grep -q '[[ -f ~/.bash-preexec.sh ]] && source ~/.bash-preexec.sh' ~/.bashrc ||\
echo -e '\n[[ -f ~/.bash-preexec.sh ]] && source ~/.bash-preexec.sh' >> ~/.bashrc
# Adding resh shellrc to .zshrc ...
if [ -f ~/.zshrc ]; then
grep -q '[ -f ~/.resh/shellrc ] && source ~/.resh/shellrc' ~/.zshrc ||\
echo -e '\n[ -f ~/.resh/shellrc ] && source ~/.resh/shellrc' >> ~/.zshrc
fi
# Deleting zsh completion cache - for future use
# [ ! -e ~/.zcompdump ] || rm ~/.zcompdump
@ -148,8 +156,7 @@ nohup resh-daemon &>/dev/null & disown
|| cat /proc/sys/kernel/random/uuid > ~/.resh/resh-uuid 2>/dev/null \
|| scripts/uuid.sh > ~/.resh/resh-uuid 2>/dev/null
echo "\
echo "
##########################################################
# #
# SUCCESS - thank you for trying out this project! #
@ -177,6 +184,6 @@ echo "\
You can uninstall this at any time by running 'rm -rf ~/.resh/'
You won't lose any collected history by removing '~/.resh/' directory
Please give me some contact info using this form: https://forms.gle/227SoyJ5c2iteKt98
"
# CONTACT
# Please give me some contact info using this form: https://forms.gle/227SoyJ5c2iteKt98

@ -23,8 +23,8 @@ fi
version="${tag:1}"
# TODO: check if version is numeric
echo " * Latest version: $version (git tag: $tag)"
echo
echo "Latest version: $version (git tag: $tag)"
if [ "$(uname)" = "Darwin" ]; then
OS=darwin
@ -59,7 +59,8 @@ dl_binaries="$dl_base/$fname_binaries"
tmpdir="$(mktemp -d /tmp/resh-rawinstall-XXX)"
echo "Changing to $tmpdir ..."
# echo
# echo "Changing to $tmpdir ..."
cd "$tmpdir"
echo "Downloading files ..."
@ -83,11 +84,12 @@ if [ "$(sha256sum "$fname_binaries")" != "$(grep "$fname_binaries" "$fname_check
echo "ERROR: integrity check failed - exiting!"
exit 1
fi
echo " * OK"
echo
echo "Extracting downloaded files ..."
tar -xzf "$fname_binaries"
echo " * OK"
if ! scripts/install.sh; then
if [ $? != 130 ]; then

Loading…
Cancel
Save