feat: add partition table, move pkglist, update clean alias
This commit is contained in:
4
.zshrc
4
.zshrc
@@ -51,8 +51,8 @@ export TERMINAL=alacritty
|
|||||||
bindkey '^[[3~' delete-char
|
bindkey '^[[3~' delete-char
|
||||||
|
|
||||||
# Update and clean
|
# Update and clean
|
||||||
alias update='yay -Syu --noconfirm && yay -Yc --noconfirm && sudo mkinitcpio -P && sudo /home/lucas/scripts/mkinitcpio-eco && clean && pacman -Qqe > ~/pkglist_officiel.txt && pacman -Qqm > ~/pkglist_aur.txt'
|
alias update='yay -Syu --noconfirm && yay -Yc --noconfirm && sudo mkinitcpio -P && sudo /home/lucas/scripts/mkinitcpio-eco && clean'
|
||||||
alias clean='sudo rm -f /var/cache/pacman/pkg/download-* 2>/dev/null; yay -Sc --noconfirm 2>/dev/null; sudo journalctl --vacuum-time=2weeks; sudo pacman -Rns $(pacman -Qdtq) 2>/dev/null'
|
alias clean='sudo rm -f /var/cache/pacman/pkg/download-* 2>/dev/null; yay -Sc --noconfirm 2>/dev/null; sudo journalctl --vacuum-time=2weeks; pacman -Qdtq | grep -q . && sudo pacman -Rns $(pacman -Qdtq) 2>/dev/null || true'
|
||||||
alias clr='clear'
|
alias clr='clear'
|
||||||
alias dotpush='~/scripts/dotpush.sh'
|
alias dotpush='~/scripts/dotpush.sh'
|
||||||
|
|
||||||
|
|||||||
@@ -8,15 +8,17 @@ config() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# ============================================================
|
# ============================================================
|
||||||
# Script de sauvegarde interactif (ordre corrigé)
|
# Script de sauvegarde interactif
|
||||||
# ============================================================
|
# ============================================================
|
||||||
cd ~
|
cd ~
|
||||||
|
|
||||||
# 1. Stager TOUS les fichiers autorisés par la whitelist
|
echo "🔄 Mise à jour des listes de paquets..."
|
||||||
|
pacman -Qqe > ~/scripts/pkglist_officiel.txt
|
||||||
|
pacman -Qqm > ~/scripts/pkglist_aur.txt
|
||||||
|
|
||||||
echo "⏳ Staging des fichiers autorisés..."
|
echo "⏳ Staging des fichiers autorisés..."
|
||||||
config add .
|
config add .
|
||||||
|
|
||||||
# 2. Vérifier ce qui est EFFECTIVEMENT dans le stage (prêt à être commité)
|
|
||||||
local staged_changes=$(config status -s)
|
local staged_changes=$(config status -s)
|
||||||
|
|
||||||
if [[ -z "$staged_changes" ]]; then
|
if [[ -z "$staged_changes" ]]; then
|
||||||
@@ -25,14 +27,12 @@ if [[ -z "$staged_changes" ]]; then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 3. Afficher le contenu du stage (ce qui va VRAIMENT partir)
|
|
||||||
echo "📦 Voici les fichiers qui seront DANS le commit :"
|
echo "📦 Voici les fichiers qui seront DANS le commit :"
|
||||||
echo "-----------------------------------------------------"
|
echo "-----------------------------------------------------"
|
||||||
config status -s
|
config status -s
|
||||||
echo "-----------------------------------------------------"
|
echo "-----------------------------------------------------"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
# 4. Demander le message de commit
|
|
||||||
echo -n "✏️ Entrez le message de commit (ou Entrée pour auto) : "
|
echo -n "✏️ Entrez le message de commit (ou Entrée pour auto) : "
|
||||||
read -r msg
|
read -r msg
|
||||||
|
|
||||||
@@ -41,10 +41,8 @@ if [[ -z "$msg" ]]; then
|
|||||||
echo "⏩ Message auto : \"$msg\""
|
echo "⏩ Message auto : \"$msg\""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 5. Commiter
|
|
||||||
config commit -m "$msg"
|
config commit -m "$msg"
|
||||||
|
|
||||||
# 6. Pousser
|
|
||||||
if config remote | grep -q origin; then
|
if config remote | grep -q origin; then
|
||||||
echo "🚀 Push vers origin master..."
|
echo "🚀 Push vers origin master..."
|
||||||
config push origin master
|
config push origin master
|
||||||
|
|||||||
16
scripts/partition_table_backup.txt
Normal file
16
scripts/partition_table_backup.txt
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
label: gpt
|
||||||
|
label-id: 3D8FF6B9-8FD6-461D-898D-F0D301092AB8
|
||||||
|
device: /dev/nvme0n1
|
||||||
|
unit: sectors
|
||||||
|
first-lba: 34
|
||||||
|
last-lba: 4000797326
|
||||||
|
sector-size: 512
|
||||||
|
|
||||||
|
/dev/nvme0n1p1 : start= 2048, size= 409600, type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B, uuid=CA3D5834-57BB-44B3-811B-E379D2D3592F, name="EFI system partition"
|
||||||
|
/dev/nvme0n1p2 : start= 411648, size= 262144, type=E3C9E316-0B5C-4DB8-817D-F92DF00215AE, uuid=09A1469F-AC65-4B3B-8EE0-E86C3B2CC029, name="Microsoft reserved partition"
|
||||||
|
/dev/nvme0n1p3 : start= 673792, size= 1966500905, type=EBD0A0A2-B9E5-4433-87C0-68B6B72699C7, uuid=B64E1752-8918-4748-9B75-56128D0E7476, name="Basic data partition"
|
||||||
|
/dev/nvme0n1p4 : start= 3933675520, size= 2027520, type=DE94BBA4-06D1-4D40-A16A-BFD50179D6AC, uuid=4D5DF032-B596-463A-9813-65B70A858CCB, attrs="RequiredPartition GUID:63"
|
||||||
|
/dev/nvme0n1p5 : start= 3935703040, size= 62029824, type=DE94BBA4-06D1-4D40-A16A-BFD50179D6AC, uuid=E968A205-AA7A-4538-9A3D-D9BF99C0633A, attrs="RequiredPartition GUID:63"
|
||||||
|
/dev/nvme0n1p6 : start= 3997734912, size= 3041280, type=DE94BBA4-06D1-4D40-A16A-BFD50179D6AC, uuid=62DEC9AA-37D9-49A6-A4BC-37C122B72E62, attrs="RequiredPartition GUID:63"
|
||||||
|
/dev/nvme0n1p7 : start= 1967175680, size= 1965031424, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=B664BCA2-13B2-4692-A454-DAA926B70D58
|
||||||
|
/dev/nvme0n1p8 : start= 3932207104, size= 1468416, type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B, uuid=409CAB91-CC45-4ADD-9F37-A334E92F8552
|
||||||
Reference in New Issue
Block a user