33 Commits
1.4 ... 1.11

Author SHA1 Message Date
23d29820b4 Tutorial Dateien. 2026-04-05 12:23:06 +02:00
01372ed6dd Teil 27. 2026-02-12 05:42:42 +01:00
ea5900d9ab erste Version von family.sh 2026-02-06 06:52:33 +01:00
06f622b37f LICENSE aktualisiert
MIT Lizenz
2026-02-05 06:05:42 +00:00
776ed5ed91 .gitignore 2026-01-24 16:02:16 +01:00
91a330998b Bezeichnung verbessert. 2026-01-24 15:55:08 +01:00
7628e01b69 erste Version der Scripts. 2026-01-24 12:56:23 +01:00
7ab41a9829 trap löschen auskommentiert. 2026-01-17 10:26:19 +01:00
684e62e0d8 Beispiele zum Blogpost. 2026-01-17 09:36:55 +01:00
bc827535b9 usage() 2026-01-09 13:42:29 +01:00
1ba9b4ba52 spinner als Wrapper. 2026-01-09 12:59:07 +01:00
88f7a07626 spinner Code. 2026-01-09 09:52:31 +01:00
e265d95dd9 Versuche 2025-11-23 14:10:28 +01:00
0939c771f3 Readme.md aktualisiert. 2025-11-21 11:22:28 +01:00
815a66d808 Verzeichnis umbenannt. 2025-09-15 10:27:37 +02:00
f7336ae3e6 Merge branch 'develop' 2025-09-15 10:24:16 +02:00
e2346fa32f Aufgeräumt. 2025-09-15 09:50:35 +02:00
ff7035cd22 power.sh für mehrdimensionale Arrays. 2025-09-15 09:37:35 +02:00
4bd2566b04 declare ausgelagert. 2025-09-08 09:33:48 +02:00
0d67903acf array Demos 2025-09-07 14:15:56 +02:00
96f5040dfe append.sh und remove.sh 2025-09-07 11:35:12 +02:00
a48e6bc452 Migrationsscript für /boot/firmware erster Aufschlag. 2025-07-09 17:54:50 +02:00
e64461d64c family_case.sh 2025-06-30 12:56:18 +02:00
dde357c695 Typo 2025-06-19 06:49:21 +02:00
c750cb4c69 Klammernotation beim Parameter. 2025-06-19 06:48:16 +02:00
1af089d106 Verzeichnisse in die korrekte Reihenfolge umbenannt. 2025-06-19 06:24:38 +02:00
dcaafa8604 Umbenennung. 2025-06-19 05:59:08 +02:00
c3f9740332 „teil24/familyif.sh“ hinzufügen
Version mit if
2025-06-17 05:16:31 +00:00
81a7c96f7f teil22 2025-06-16 13:02:22 +02:00
89557b8e36 Revert "„teil23/parseargs.sh“ ändern"
This reverts commit fb7c410e8a.
2025-05-17 12:09:46 +02:00
5d830cbae4 Merge pull request '„teil23/parseargs.sh“ ändern' (#1) from develop into master
Reviewed-on: #1
2025-05-13 12:06:27 +00:00
fb7c410e8a „teil23/parseargs.sh“ ändern 2025-05-13 11:58:31 +00:00
e4190bae83 parseargs.sh 2025-05-12 07:13:05 +02:00
551 changed files with 1071 additions and 3 deletions

19
LICENSE
View File

@@ -1,5 +1,18 @@
Copyright (C) YEAR by AUTHOR EMAIL MIT License
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. Copyright (c) 2026- raspithek
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -20,4 +20,12 @@ Dateien des bash Tutorioals auf raspithek.de
| 14 |exit Codes | | 14 |exit Codes |
| 15 |von der Idee zum Script | | 15 |von der Idee zum Script |
| 16 |Funktionen | | 16 |Funktionen |
| 17 |Piping und Redirection |
| 18 |tee |
| 19 |alias |
| 20 |Shebang |
| 21 |sed |
| 22 |cd |
| 23 |case |
| 24 |Arrays |

View File

@@ -0,0 +1,66 @@
#!/usr/bin/bash
# Output colors
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
# Logging-Funktion
log() {
echo -e "${GREEN}[INFO]${NC} $1"
}
warn() {
echo -e "${YELLOW}[WARN]${NC} $1"
}
error() {
echo -e "${RED}[ERROR]${NC} $1"
}
# Check for root privileges
if [ "$EUID" -ne 0 ]; then
echo "This script must be run as root"
exit 1
fi
# Create /boot/firmware dir if it doesn't exist
if [ ! -d /boot/firmware ]; then mkdir -p /boot/firmware; fi
# Enable extended globbing for pattern matching
shopt -s extglob
# Copy all files from /boot to /boot/firmware and remove the originals
log "Moving files to /boot/firmware..."
rsync -av --remove-source-files /boot/ /boot/firmware/
# Update the mount point for /boot in fstab to /boot/firmware
log "Updating fstab..."
cp -a /etc/fstab /etc/fstab.bak # create backup
sed -i 's|^\([^#].*\)[[:space:]]/boot[[:space:]]|\1 /boot/firmware |' /etc/fstab
# Sync cache and reboot the system to apply changes
sync
# prompt for reboot
echo ""
while true; do
read -p "Möchtest du das System jetzt neustarten, um die Änderungen zu testen? (J/N): " choice
case $choice in
[Jj]* )
warn "System will be rebooted in 3 seconds"
sleep 2
reboot
;;
[Nn]* )
log "Neustart übersprungen."
log "Bitte starte das System manuell neu, um die Änderungen zu testen."
break
;;
* )
warn "Bitte antworte mit J (Ja) oder N (Nein)."
;;
esac
done
exit 0

11
piping/ask Executable file
View File

@@ -0,0 +1,11 @@
read -n1 -p "Weitermachen? (j/n)" auswahl
echo "auswahl = ${auswahl}"
if [ "${auswahl}" == 'j' ];then
echo "Es geht weiter"
else
echo "Dann eben nicht"
fi

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

Some files were not shown because too many files have changed in this diff Show More