|
@ -24,12 +24,45 @@ else |
|
|
cp /root/.bashrc /root/.bashrc.pre-install |
|
|
cp /root/.bashrc /root/.bashrc.pre-install |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
apt-get install fzf fd-find </dev/null |
|
|
|
|
|
ln -sf "$(which fdfind)" /usr/local/bin/fd |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ! type -p fzf; then |
|
|
|
|
|
|
|
|
|
|
|
## Required to get fzf |
|
|
|
|
|
case $(lsb_release -is) in |
|
|
|
|
|
Debian) |
|
|
|
|
|
case $(lsb_release -rs) in |
|
|
|
|
|
9) |
|
|
|
|
|
backports_list="/etc/apt/sources.list.d/backports.list" |
|
|
|
|
|
if ! [ -e "$backports_list" ]; then |
|
|
|
|
|
echo "deb http://ftp.debian.org/debian stretch-backports main" > \ |
|
|
|
|
|
"$backports_list" |
|
|
|
|
|
## Update only this repo: |
|
|
|
|
|
apt-get update -o Dir::Etc::sourcelist="sources.list.d/backports.list" \ |
|
|
|
|
|
-o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0" |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
;; |
|
|
|
|
|
esac |
|
|
|
|
|
;; |
|
|
|
|
|
esac |
|
|
|
|
|
|
|
|
|
|
|
apt-get install fzf </dev/null |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
if ! type -p fd-find; then |
|
|
|
|
|
if apt-get install fd-find </dev/null; then |
|
|
|
|
|
ln -sf "$(which fdfind)" /usr/local/bin/fd |
|
|
|
|
|
else |
|
|
|
|
|
wget https://github.com/sharkdp/fd/releases/download/v8.2.1/fd_8.2.1_amd64.deb -O /tmp/fd.deb |
|
|
|
|
|
dpkg -i /tmp/fd.deb |
|
|
|
|
|
fi |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
if ! [ -e "/usr/share/doc/fzf/examples/key-bindings.bash.orig" ]; then |
|
|
## Use C-f instead of C-t for file insertion |
|
|
## Use C-f instead of C-t for file insertion |
|
|
sed -r -i.orig 's/C-t/C-f/g' /usr/share/doc/fzf/examples/key-bindings.bash |
|
|
sed -r -i.orig 's/C-t/C-f/g' /usr/share/doc/fzf/examples/key-bindings.bash |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
cat <<EOF >> /root/.bashrc |
|
|
cat <<EOF >> /root/.bashrc |
|
|
|
|
|
|
|
|