|
1 |
| -#!/bin/zsh |
| 1 | +#!/bin/bash |
2 | 2 |
|
3 |
| -# even though the shebang *says* zsh, make sure its actually using zsh |
4 |
| -if [ -z "$ZSH_VERSION" ]; then |
5 |
| - echo "Doesn't look like you're using zsh..." |
6 |
| - echo "Please install zsh and then re-run this script using zsh" |
7 |
| - exit 1 |
8 |
| -fi |
| 3 | +echo "TODO: actually make the fish symlinks :/" |
| 4 | +# also: set -U EDITOR vim |
| 5 | +# set -U ???? |
| 6 | +# uhh, maybe just like, copy the uvars or somethihng? |
| 7 | +exit |
9 | 8 |
|
10 | 9 | INSTALL_PATH="$(realpath $(dirname $0))"
|
11 | 10 | USER="$(whoami)"
|
12 | 11 |
|
13 | 12 | # do the config symlinks
|
14 |
| -TO_INSTALL=(bin tmux.conf i3 powerline_config zshrc vim oh-my-zsh zsh-syntax-highlighting powerline-daemon.service aliases Xmodmaprc) |
15 |
| -TO_PATHS=(~/bin ~/.tmux.conf ~/.i3 ~/.config/powerline ~/.zshrc ~/.vim ~/.oh-my-zsh ~/.zsh-syntax-highlighting ~/.config/systemd/user/powerline-daemon.service ~/.aliases ~/.Xmodmaprc) |
| 13 | +TO_INSTALL=(bin tmux.conf i3 powerline_config vim powerline-daemon.service) |
| 14 | +TO_PATHS=(~/bin ~/.tmux.conf ~/.i3 ~/.config/powerline ~/.vim ~/.config/systemd/user/powerline-daemon.service) |
16 | 15 |
|
17 |
| -for i in {1..${#TO_INSTALL}}; do |
| 16 | +for i in $(seq 1 ${#TO_INSTALL[@]}); do |
18 | 17 | if [ -f "${TO_PATHS[i]}" ] || [ -d "${TO_PATHS[i]}" ]; then
|
19 | 18 | if [ -f "$INSTALL_PATH/overwrite" ]; then
|
20 |
| - rm "${TO_PATHS[i]}" |
| 19 | + echo rm "${TO_PATHS[i]}" |
21 | 20 | else
|
22 |
| - rm -ri "${TO_PATHS[i]}" |
| 21 | + echo rm -ri "${TO_PATHS[i]}" |
23 | 22 | fi
|
24 | 23 | fi
|
25 | 24 | if ! [ -f "${TO_PATHS[i]}" ]; then
|
26 |
| - mkdir -p "$(dirname ${TO_PATHS[i]})" |
27 |
| - ln -sfT "$INSTALL_PATH/${TO_INSTALL[i]}" "${TO_PATHS[i]}" |
| 25 | + echo mkdir -p "$(dirname ${TO_PATHS[i]})" |
| 26 | + echo ln -sfT "$INSTALL_PATH/${TO_INSTALL[i]}" "${TO_PATHS[i]}" |
28 | 27 | fi
|
29 | 28 | done
|
30 | 29 |
|
| 30 | +exit 1 |
| 31 | + |
31 | 32 | # clone any sub-repos that need to be cloned
|
32 | 33 | cd "$INSTALL_PATH"
|
33 | 34 | git submodule update --init --recursive
|
34 | 35 |
|
35 | 36 | # install distro-specific packages
|
36 | 37 | # check for sudo access first
|
37 | 38 | if sudo -l >/dev/null; then
|
38 |
| - # RELEASE_STR="$(tr '[:upper:]' '[:lower:]' < /etc/issue)" |
39 | 39 | . /etc/os-release # only works w/ systemd
|
40 | 40 |
|
41 | 41 | case "$ID" in
|
42 | 42 | *debian*|*ubuntu*|*raspbian* )
|
43 | 43 | # do apt stuff
|
44 |
| - sudo apt install -y python3 python3-pip python3-dev build-essential zsh cmake tmux vim |
| 44 | + sudo apt install -y python3 python3-pip python3-dev build-essential cmake tmux vim fish |
45 | 45 | ;;
|
46 | 46 | *arch* )
|
47 | 47 | # do arch stuff
|
48 |
| - sudo pacman -S --noconfirm --needed python-pip base-devel zsh git cmake tmux vim |
| 48 | + sudo pacman -S --noconfirm --needed python-pip base-devel git cmake tmux vim fish |
49 | 49 | ;;
|
50 | 50 | *centos* )
|
51 | 51 | # do centos stuff
|
| 52 | + echo -e '\n*** Just a fair warning, this centos support is uuber janky ***\n' |
52 | 53 | sudo yum -y install epel-release
|
53 |
| - sudo yum -y install python36-pip git zsh vim tmux |
| 54 | + sudo yum -y install python36-pip git vim tmux fish |
54 | 55 | sudo yum -y groupinstall "Development Tools"
|
55 | 56 | sudo pip3.6 install --upgrade pip # this fixes pip3 to point to pip3.6
|
56 | 57 | sudo sh -c 'echo "export PATH=/usr/local/bin:$PATH >> /etc/profile"' # make root be able to use pip3
|
|
68 | 69 |
|
69 | 70 |
|
70 | 71 | # install pip packages
|
71 |
| -pip3 install --user thefuck powerline-status |
| 72 | +pip3 install --user powerline-status i3-py |
72 | 73 |
|
73 | 74 | # Create the python symlink to be compatible with old pythons
|
74 | 75 | PY_VER="$(python3 -c "from sys import version_info as vi; print('python'+str(vi[0])+'.'+str(vi[1]))")"
|
75 | 76 | mkdir -p ~/.local/lib
|
76 | 77 | ln -s ~/.local/lib/$PY_VER ~/.local/lib/python3
|
77 | 78 |
|
78 |
| -# change shell to zsh |
| 79 | +# change shell to fish |
79 | 80 | echo "Changing default shell - enter password"
|
80 |
| -chsh -s '/bin/zsh' |
| 81 | +chsh -s '/bin/fish' |
81 | 82 |
|
82 | 83 | # install and enable powerline-daemon systemd service
|
83 | 84 | systemctl --user daemon-reload
|
|
0 commit comments