You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- #!/bin/bash
-
- set +e
- set -o pipefail
-
- # Assuming g++ and gcc are located in /usr/bin/
- update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 50 > /tmp/.switch-to-g++.stdout
- update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 50 >> /tmp/.switch-to-g++.stdout
- update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++ 50 >> /tmp/.switch-to-g++.stdout
- update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc 50 >> /tmp/.switch-to-g++.stdout
- # You might also want to update ld, depending on your requirements
- # update-alternatives --install /usr/bin/ld ld /path/to/your/ld 50 >> /tmp/.switch-to-g++.stdout
-
- echo "Compiler set to: $(readlink /etc/alternatives/c++)"
|