This commit is contained in:
karim hassan
2025-08-18 19:30:47 +00:00
parent dd17d9f4bf
commit e3620c7f42
16 changed files with 562 additions and 0 deletions

25
sync.sh Executable file
View File

@@ -0,0 +1,25 @@
{\rtf1\ansi\ansicpg1252\cocoartf2822
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fnil\fcharset0 .AppleSystemUIFontMonospaced-Regular;}
{\colortbl;\red255\green255\blue255;\red135\green5\blue129;\red0\green0\blue0;\red181\green0\blue19;
\red50\green91\blue97;\red13\green100\blue1;\red151\green0\blue126;}
{\*\expandedcolortbl;;\cssrgb\c60784\c13725\c57647;\csgray\c0;\cssrgb\c76863\c10196\c8627;
\cssrgb\c24706\c43137\c45490;\cssrgb\c0\c45490\c0;\cssrgb\c66667\c5098\c56863;}
\paperw11900\paperh16840\margl1440\margr1440\vieww11520\viewh8400\viewkind0
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0
\f0\fs26 \cf2 #!/bin/bash\cf3 \
set -e\
MSG=\cf4 "\cf5 $\{1:-chore: quick sync\}\cf4 "\cf3 \
\
\cf6 # S\'92assure qu\'92on est dans un repo\cf3 \
git rev-parse --is-inside-work-tree >/dev/null 2>&1 || \{ echo \cf4 "Pas un d\'e9p\'f4t Git"\cf3 ; exit 1; \}\
\
\cf6 # Ajoute, commit et push\cf3 \
git add -A\
\cf7 if\cf3 ! git diff --cached --quiet; \cf7 then\cf3 \
git commit -m \cf4 "\cf5 $MSG\cf4 "\cf3 \
\cf7 else\cf3 \
echo \cf4 "Rien \'e0 committer."\cf3 \
\cf7 fi\cf3 \
git push\
echo \cf4 "\uc0\u9989 Sync OK"}