Skip to content

SamAmandes/Scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My BASH scripts

Why does this exist?

Honestly? Boredom. Are these scripts necessary? No. Would someone who properly knows their tools need them? Also no. But writing a wrapper script is more fun than reading documentation, so here we are.

(Oh, and they're not exactly up to date either. I'll get around to fixing them eventually. Probably. Maybe.)

Scripts

Bash: Bash <filename>

  • Creates a Bash script file (filename.sh) with the shebang pre-written.
  • Automatically adds executable permissions to the created script.
  • Opens the file in your default editor for immediate editing.

c#: c# <project name>

  • Generates a new C# console application using dotnet new console --use-program-main with provided project name.
  • Opens the generated Program.cs file in Neovim for immediate editing.
  • Note: Requires .NET SDK.

mdToPdf: mdToPdf <markdownfile.md>

  • Converts a Markdown file to a PDF.
  • Uses Pandoc for the conversion, which is convenient when working with Markdown files frequently.

Update: sudo /path/to/Update or sudo $(which Update)

  • Run as root
  • Colored output with timestamps
  • Internet connectivity check
  • Updates pacman, AUR (yay), Flatpak
  • Firmware updates (fwupdmgr)
  • Cache cleaning
  • Reboot notifications
  • Error handling with set -euo pipefail
  • Note: Because sudo uses a restricted PATH, you must either:
    • Use the full path to the script (e.g., /home/user/scripts/Update or /usr/local/bin/Update)
    • Use command substitution: sudo $(which Update)
    • Alternatively, add an alias to your shell config: alias update='sudo $(which Update)'

About

Scripts to make my lazy life lazier

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages