bin/homedir-setup

changeset 459
efa21f0b1dca
parent 383
c14c440cda0f
child 461
d5abcf2b7365
equal deleted inserted replaced
458:cb65d7e5caf2 459:efa21f0b1dca
9 if ! git --version >/dev/null; then 9 if ! git --version >/dev/null; then
10 echo "Please install git!" >&2 10 echo "Please install git!" >&2
11 exit 1 11 exit 1
12 fi 12 fi
13 13
14 pull () { 14 pull() {
15 echo "$1:" 15 echo "$1:"
16 git -C $1 pull --no-tags 16 git -C "$1" pull --no-tags
17 } 17 }
18 18
19 if ! [ -d .zgen ]; then 19 if ! [ -d .zgen ]; then
20 git clone https://github.com/tarjoilija/zgen.git .zgen 20 git clone https://github.com/tarjoilija/zgen.git .zgen
21 else 21 else
42 else 42 else
43 pull .asdf/plugins/$LANG 43 pull .asdf/plugins/$LANG
44 fi 44 fi
45 done 45 done
46 46
47 # Transition older stuff to asdf 47 # Get rid of older stuff
48 if [ -d .rbenv ]; then 48 if [ -d .rbenv ]; then
49 echo 'Removing rbenv and moving ruby installs' 49 echo 'rbenv is still installed' >&2
50 echo 'bin/* in each version dir needs all shebang lines fixed'
51
52 if [ -d .rbenv/versions ]; then
53 mkdir -p .asdf/installs
54 mv .rbenv/versions .asdf/installs/ruby
55 for ver in .asdf/installs/ruby/*; do
56 bash -c "asdf reshim ruby $(basename $ver)"
57 done
58 fi
59
60 if [ -f .rbenv/version ]; then
61 echo "ruby $(cat .rbenv/version)" >> .tool-versions
62 fi
63
64 rm -rf .rbenv
65 fi 50 fi
66 51
67 if [ -d .ndenv ]; then 52 if [ -d .ndenv ]; then
68 echo 'Removing ndenv and moving node installs' 53 echo 'ndenv is still installed' >&2
69
70 if [ -d .ndenv/versions ]; then
71 mkdir -p .asdf/installs
72 mv .ndenv/versions .asdf/installs/nodejs
73 for ver in .asdf/installs/nodejs/*; do
74 bash -c "asdf reshim nodejs $(basename $ver)"
75 done
76 fi
77
78 if [ -f .ndenv/version ]; then
79 echo "nodejs $(cat .ndenv/version)" >> .tool-versions
80 fi
81
82 rm -rf .ndenv
83 fi 54 fi

mercurial