Skip to content

Instantly share code, notes, and snippets.

View 103sbavert's full-sized avatar

Sbavert 103sbavert

View GitHub Profile
@103sbavert
103sbavert / arch-update.sh
Last active December 16, 2022 04:04
A shell script made by ChatGPT to update Arch Linux. This script takes five options, namely, -h, -c, -o, -a and -f. If provided none, -o, -a and -f are assumed (in that order). Options can be specified individually divided by spaces or they can be combined together like so: -aof. The order is preserved.
#!/bin/bash
# Define error messages
errmes[1]="Error: Unknown argument"
errmes[2]="Error: Too many arguments"
errmes[3]="Error: Unknown option"
# Define colors
GREEN="\e[32m"
RED="\e[31m"