-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall
executable file
·82 lines (71 loc) · 2.22 KB
/
install
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#!/bin/bash
ln -s `pwd` $HOME/.config/nvim
require_packages=""
#check git
which git
if [[ $? != 0 ]] ; then
require_packages+="git "
fi
#check find - for telescope
if [[ `apt list ripgrep fd-find --installed | wc -l` != 3 ]] ; then
require_packages+="ripgrep fd-find "
fi
# check php8.2 - for phpactor
if [[ `apt list php8* --installed | wc -l` == 1 ]] ; then
echo "PHP 8.2をインストールします"
sudo wget -qO /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list
sudo apt update
require_packages+="php php-dev php-gd php-xml php-soap php-mbstring php-mysql php-curl "
fi
# check python
which pip3
if [[ $? != 0 ]] ; then
$require_packages+="python3 python3-dev python3-pip "
fi
# apt install
if [ $require_packages ] ; then
sudo apt install $require_packages
fi
# pynvim check - for defx
pip3 list | grep pynvim
if [[ $? != 0 ]] ; then
pip3 install pynvim
fi
# composer check - for phpactor
which composer
if [[ $? != 0 ]] ; then
echo "composerをインストールします"
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === '55ce33d7678c5a611085589f1f3ddf8b3c52d662cd01d4ba75c0ee0459970c2200a51f492d557530c71c15d8dba01eae') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
sudo mv composer.phar /usr/local/bin/composer
fi
# phpactor install
which phpactor
if [[ $? != 0 ]] ; then
echo "phpactorをインストールします"
git clone [email protected]:phpactor/phpactor
cd phpactor
phpactor_path=`pwd`
composer install
cd /usr/local/bin
sudo ln -s "${phpactor_path}/bin/phpactor" phpactor
phpactor status
fi
# yarn check - for coc
which yarn
if [[ $? != 0 ]] ; then
sudo apt install node npm
sudo npm -g install yarn
fi
# coc install
coc_path=~/.config/nvim/repos/github.com/neoclide/coc.nvim
ls $coc_path/build/index.js
if [[ $? != 0 ]] ; then
rm -r $coc_path/..
git clone [email protected]:neoclide/coc.nvim $coc_path -b release
cd $coc_path
yarn install
fi