Touched up README & fixed all bracket syntax in centos2rocky.sh

This commit is contained in:
Carter Peel 2021-05-03 22:33:47 -04:00
parent 626cef11ab
commit ff225d733b
2 changed files with 26 additions and 6 deletions

View File

@ -4,8 +4,28 @@ Rocky Tools
Various scripts and tools that we find useful, whether we use them or they are
made for public consumption. For example, conversion scripts or otherwise.
## [Centos2Rocky] -- Conversion Script
Running this script will convert an existing CentOS 8 system to Rocky Linux 8.
##### Usage
```bash
./centos2rocky.sh -h
├── -h # --> Displays this help
├── -r # --> Converts to Rocky
├── -V # --> Verifies switch
└── -R # --> Reinstalls all packages
[!! USE WITH CAUTION !!]
```
.
├── centos2rocky.sh # Converts a CentOS 8.3 system to Rocky Linux 8.3
└── README.md
```
##### Debugging
The `centos2rocky` script pipes everything shown on `stdout` to `/var/log/centos2rocky.log`.
If you run in to issues executing this script, please submit an issue [here]([Issues · rocky-linux/rocky-tools · GitHub](https://github.com/rocky-linux/rocky-tools/issues)).
Make sure to [include the output log](https://pastebin.com/), and remove any sensitive information. (if any)
Feel free to create a pull request if you think you've got the fix.

View File

@ -114,7 +114,7 @@ package_swaps() {
rpm -ihv "${release_to_install[@]}"
# Distrosync if the above succeeded
if [ $? -eq 0 ]; then
if [[ $? -eq 0 ]]; then
echo "Removing dnf cache"
rm -rf /var/cache/{yum,dnf}
echo "Ensuring repos are enabled before the package swap"
@ -143,7 +143,7 @@ module_check() {
;;
esac
done
if [ ${#unknown_modules[@]} -gt 0 ]; then
if [[ ${#unknown_modules[@]} -gt 0 ]]; then
for x in "${unknown_modules[@]}"; do
echo "${x}"
done