diff --git a/install.sh b/install.sh index 8db49c2..58895fe 100755 --- a/install.sh +++ b/install.sh @@ -129,9 +129,11 @@ if ! grep -q 'export PATH=$PATH:/home/autobuild/tools/win32/bin' ~/.bashrc; then echo 'export PATH=$PATH:/home/autobuild/tools/win32/bin' >> ~/.bashrc fi -if ! grep -q '$PATH:/home/autobuild/tools/win32/bin' /etc/profile; then - print_msg "Adding '/home/autobuild/tools/win32/bin' to '/etc/profiles'" - sudo echo '$PATH:/home/autobuild/tools/win32/bin' >> /etc/profile +if (whoami != root) + if ! grep -q '$PATH:/home/autobuild/tools/win32/bin' /etc/profile; then + print_msg "Adding '/home/autobuild/tools/win32/bin' to '/etc/profiles'" + sudo echo '$PATH:/home/autobuild/tools/win32/bin' >> /etc/profile.d/KolibriOS-Toolchain.sh + fi fi cd "$OLDPWD" diff --git a/package/DEBIAN/postrm b/package/DEBIAN/postrm index 6e9c374..1df6a88 100755 --- a/package/DEBIAN/postrm +++ b/package/DEBIAN/postrm @@ -1,3 +1,4 @@ #!/bin/bash rm -R /home/autobuild/tools/win32 +rm /etc/profiles.d/KolibriOS-Toolchain.sh