From 3a7ae579d3b898ee81a30ba89165abf275476385 Mon Sep 17 00:00:00 2001 From: karasu Date: Wed, 6 Dec 2017 11:54:36 +0100 Subject: [PATCH] Modify .bashrc to load .bashrc.aliases --- scripts/postinstall.sh | 10 +++++----- src/info.py | 2 +- src/installation/install.py | 11 +++++++++++ 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/scripts/postinstall.sh b/scripts/postinstall.sh index d1961173d..3270dfcb8 100755 --- a/scripts/postinstall.sh +++ b/scripts/postinstall.sh @@ -257,8 +257,6 @@ enlightenment_settings() { set_dmrc enlightenment - echo "QT_STYLE_OVERRIDE=gtk" >> ${CN_DESTDIR}/etc/environment - # Add lxpolkit to autostart apps cp /etc/xdg/autostart/lxpolkit.desktop ${CN_DESTDIR}/home/${CN_USER_NAME}/.config/autostart } @@ -338,16 +336,18 @@ postinstall() { env_files=("${CN_DESTDIR}/etc/environment" "${CN_DESTDIR}/home/${CN_USER_NAME}/.bashrc" "${CN_DESTDIR}/etc/skel/.bashrc" - "${CN_DESTDIR}/etc/profile") + "${CN_DESTDIR}/etc/profile") for file in "${env_files[@]}" do - echo "# >>> BEGIN ADDED BY CNCHI INSTALLER" >> "${file}" + echo "# >>> Added by cnchi installer" >> "${file}" if [ "${CN_BROWSER}" != "" ]; then echo "BROWSER=/usr/bin/${CN_BROWSER}" >> "${file}" fi echo "EDITOR=/usr/bin/nano" >> "${file}" - echo "# <<< END ADDED BY CNCHI INSTALLER" >> "${file}" + # This is inside .bashrc.aliases from the antergos-desktop-settings package + #echo "export QT_STYLE_OVERRIDE=gtk" >> "${file}" + #echo "export QT_SELECT=qt5" >> "${file}" done # Configure makepkg so that it doesn't compress packages after building. diff --git a/src/info.py b/src/info.py index 8ad4e127b..54552f71f 100755 --- a/src/info.py +++ b/src/info.py @@ -29,7 +29,7 @@ """ Set some Cnchi global constants """ -CNCHI_VERSION = "0.14.408" +CNCHI_VERSION = "0.14.409" CNCHI_WEBSITE = "http://www.antergos.com" CNCHI_RELEASE_STAGE = "production" diff --git a/src/installation/install.py b/src/installation/install.py index 3b7e15cd7..e78ec1d87 100644 --- a/src/installation/install.py +++ b/src/installation/install.py @@ -1528,3 +1528,14 @@ def configure_system(self): nanorc.write('set keycolor cyan\n') nanorc.write('set functioncolor green\n') nanorc.write('include "/usr/share/nano/*.nanorc"\n') + + # Set .bashrc (in skel and user) to load .bashrc.aliases + bashrc_files = ["/etc/skel/.bashrc"] + bashrc_files.append("/home/{}/.bashrc".format(username)) + for bashrc_file in bashrc_files: + if os.path.exists(bashrc_file): + with open(bashrc_file, 'a') as bashrc: + bashrc.write('\n') + bashrc.write('if [ -e ~/.bashrc.aliases ] ; then\n') + bashrc.write(' source ~/.bashrc.aliases\n') + bashrc.write('fi\n')