mirror of
https://github.com/Egor00f/kolibrios-gcc-toolchain.git
synced 2024-11-21 17:03:48 +01:00
fix install and prerm
This commit is contained in:
parent
a882106a25
commit
5886611082
17
install.sh
17
install.sh
@ -123,17 +123,18 @@ sudo ln -sf /usr/lib/libmpfr.so.6 /usr/lib/libmpfr.so.4
|
|||||||
print_ok "Successfully!"
|
print_ok "Successfully!"
|
||||||
|
|
||||||
|
|
||||||
if ! grep -q 'export PATH=$PATH:/home/autobuild/tools/win32/bin' ~/.bashrc; then
|
|
||||||
|
|
||||||
|
if [ ! "$(id -u)" -ne 0 ]
|
||||||
|
then
|
||||||
|
print_msg "Add"
|
||||||
|
echo 'PATH=$PATH:/home/autobuild/tools/win32/bin' >> /etc/profile
|
||||||
|
else
|
||||||
|
if ! grep -q 'export PATH=$PATH:/home/autobuild/tools/win32/bin' ~/.bashrc; then
|
||||||
export PATH=$PATH:/home/autobuild/tools/win32/bin
|
export PATH=$PATH:/home/autobuild/tools/win32/bin
|
||||||
print_msg "Adding '$TOOLCHAIN_DIR/win32/bin' to '~/.bashrc'"
|
print_msg "Adding '$TOOLCHAIN_DIR/win32/bin' to '~/.bashrc'"
|
||||||
echo 'export PATH=$PATH:/home/autobuild/tools/win32/bin' >> ~/.bashrc
|
echo 'export PATH=$PATH:/home/autobuild/tools/win32/bin' >> ~/.bashrc
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ["$EUID" -ne 0 ]
|
|
||||||
then
|
|
||||||
echo 'PATH=$PATH:/home/autobuild/tools/win32/bin' >> /etc/profile
|
|
||||||
else
|
|
||||||
print_msg "You must be logined as root!"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd "$OLDPWD"
|
cd "$OLDPWD"
|
||||||
|
@ -2,4 +2,6 @@
|
|||||||
|
|
||||||
rm -R /home/autobuild/tools/win32
|
rm -R /home/autobuild/tools/win32
|
||||||
|
|
||||||
sed -i 'PATH=$PATH:/home/autobuild/tools/win32/bin' /etc/profile
|
if grep -q 'PATH=$PATH:/home/autobuild/tools/win32/bin' /etc/profile; then
|
||||||
|
sed -i 'PATH=$PATH:/home/autobuild/tools/win32/bin' /etc/profile
|
||||||
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user