Merge pull request #1324 from adevoss/adevoss-patch-admin-bashrc

Fix: Insert source file in /home/admin/.bashrc
This commit is contained in:
Christian Rotzoll 2020-07-12 18:02:26 +02:00 committed by GitHub
commit e90d5f63ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

5
build_sdcard.sh Normal file → Executable file
View File

@ -699,9 +699,12 @@ sudo bash -c "echo 'net.core.wmem_max = 1048576' >> /etc/sysctl.conf"
# install a command-line fuzzy finder (https://github.com/junegunn/fzf)
sudo apt -y install fzf
sudo bash -c "echo '' >> /home/admin/.bashrc"
sudo bash -c "echo '# Raspiblitz' >> /home/admin/.bashrc"
homeFile=/home/admin/.bashrc
keyBindings="source /usr/share/doc/fzf/examples/key-bindings.bash"
keyBindingsDone=$(cat ${homeFile}|grep -c ${keyBindings})
keyBindingsDone=$(cat $homeFile|grep -c "$keyBindings")
if [ ${keyBindingsDone} -eq 0 ]; then
sudo bash -c "echo 'source /usr/share/doc/fzf/examples/key-bindings.bash' >> /home/admin/.bashrc"