下記コマンドをターミナルに貼り付けて完了

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
#!/bin/tcsh
set PREFIX = "$HOME/local"
set backslash_quote
mkdir -p $PREFIX
cd $PREFIX

# install vscode
wget 'https://go.microsoft.com/fwlink/?LinkID=760867' -O vscode.rpm
rpm2cpio vscode.rpm | cpio -idmv
mkdir -p $PREFIX/share
mv $PREFIX/usr/share/* $PREFIX/share
rm -rf $PREFIX/usr
rm -f $PREFIX/vscode.rpm

# install libxss
wget 'https://rpmfind.net/linux/centos/7.7.1908/os/x86_64/Packages/libXScrnSaver-1.2.2-6.1.el7.x86_64.rpm'
rpm2cpio libXScrnSaver-1.2.2-6.1.el7.x86_64.rpm | cpio -idmv
mkdir -p $PREFIX/lib64
mv $PREFIX/usr/lib64/* $PREFIX/lib64
rm -rf $PREFIX/usr
rm -f $PREFIX/libXScrnSaver-1.2.2-6.1.el7.x86_64.rpm

# set env variables
mkdir -p $PREFIX/bin
echo "setenv LD_LIBRARY_PATH \"${PREFIX}/lib64:\${LD_LIBRARY_PATH}\"" >> ~/.tcshrc
echo "setenv PATH \"${PREFIX}/bin:\${PATH}\"" >> ~/.tcshrc
ln -s ${PREFIX}/share/code/bin/code ${PREFIX}/bin/

source ~/.tcshrc
code