Commit 84d8456a authored by Tristan Cavelier's avatar Tristan Cavelier Committed by iv

nayuos: improve .bashrc git configuration

parent ba61b318
...@@ -128,23 +128,25 @@ increase_revision_number ${CHROMIUM_OVERLAY}/chromeos-base/openssh-server-init/ ...@@ -128,23 +128,25 @@ increase_revision_number ${CHROMIUM_OVERLAY}/chromeos-base/openssh-server-init/
increase_revision_number ${CHROMIUM_OVERLAY}/chromeos-base/chromeos-sshd-init/ increase_revision_number ${CHROMIUM_OVERLAY}/chromeos-base/chromeos-sshd-init/
# bashrc modifications # bashrc modifications
BASH_EBUILD_DIR={{ cros_location }}/{{ branch }}/src/third_party/portage-stable/app-shells/bash BASH_EBUILD_DIR='{{ cros_location }}/{{ branch }}/src/third_party/portage-stable/app-shells/bash'
if [[ $(grep "git --exec-path" "${BASH_EBUILD_DIR}/files/dot-bashrc") ]] ; then if ! grep '----- BEGIN NayuOS configuration -----' "${BASH_EBUILD_DIR}/files/dot-bashrc" > /dev/null ; then
echo "git alias already set" cat >> "${BASH_EBUILD_DIR}/files/dot-bashrc" <<EOF
else
echo "# git quickfix for finding right git executables # ----- BEGIN NayuOS configuration -----
if [ -d /usr/local/libexec/git-core/ ] ; then
alias git='git --exec-path=/usr/local/libexec/git-core/' # git quickfix for finding right git executables
export GIT_EXEC_PATH=/usr/local/libexec/git-core
# configure .gitconfig once
if [ ! -e ~/.gitconfig ] ; then
which less &> /dev/null && git config --global core.pager less
fi fi
# git quickfix for finding 'less' and using it as pager # ----- END NayuOS configuration -----
less_path=\$(which less 2>/dev/null) EOF
if [ "\${less_path}" ] ; then
git config --global core.pager \${less_path}
fi" >> ${BASH_EBUILD_DIR}/files/dot-bashrc
fi fi
increase_revision_number ${BASH_EBUILD_DIR} increase_revision_number "${BASH_EBUILD_DIR}"
######################################## Build ############################################## ######################################## Build ##############################################
BOARDS="{{ boards_list }}" BOARDS="{{ boards_list }}"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment