pff: les fichiers du profil Base sont en lecture seule
This commit is contained in:
parent
2fa28d5cd3
commit
82c366957f
25
pff
25
pff
|
@ -858,7 +858,7 @@ function new_cmd() {
|
|||
fi
|
||||
vlfile="${i}__pv-${version}__"
|
||||
dest="$pffdir/pff/Base/$vlfile"
|
||||
if [ -e "$src" -o -L "$src" ]; then
|
||||
if flexists "$src"; then
|
||||
mkdirof "$dest"; r=$?
|
||||
edot $r "$i"; [ $r == 0 ] || break
|
||||
cp "$src" "$dest"; r=$?
|
||||
|
@ -943,23 +943,24 @@ function patch_cmd() {
|
|||
setx rfile=get_rfile "$bfile" "$pffdir"
|
||||
mkdirof "$rfile"
|
||||
cp -a "$bfile" "$rfile"
|
||||
chmod +w "$rfile"
|
||||
done
|
||||
git add -A
|
||||
git commit -qm "Base"
|
||||
[ -n "$(git status --porcelain)" ] && git commit -qm "Base"
|
||||
# créer la branche v$version depuis upstream
|
||||
git checkout -qb "v$version"
|
||||
# rajouter les fichiers de Common s'ils existent (sauf si la branche c'est Common ^^)
|
||||
if [ "$profile" != Common ]; then
|
||||
for vlfile in "${vlfiles[@]}"; do
|
||||
setx Cfile=get_Cfile "${vlfile%__pv-${version}__}" "$pffdir"
|
||||
if [ -e "$Cfile" -o -L "$Cfile" ]; then
|
||||
if flexists "$Cfile"; then
|
||||
setx rfile=get_rfile "$Cfile" "$pffdir"
|
||||
mkdirof "$rfile"
|
||||
cp -a "$Cfile" "$rfile"
|
||||
fi
|
||||
done
|
||||
git add -A
|
||||
git commit -qm "Common"
|
||||
[ -n "$(git status --porcelain)" ] && git commit -qm "Common"
|
||||
fi
|
||||
# rajouter les fichiers du profil
|
||||
for vlfile in "${vlfiles[@]}"; do
|
||||
|
@ -969,7 +970,7 @@ function patch_cmd() {
|
|||
cp -a "$pfile" "$rfile"
|
||||
done
|
||||
git add -A
|
||||
git commit -qm "$profile"
|
||||
[ -n "$(git status --porcelain)" ] && git commit -qm "$profile"
|
||||
# rebasculer vers upstream et rajouter les fichiers de patch
|
||||
git checkout -q upstream
|
||||
for vlfile in "${vlfiles[@]}"; do
|
||||
|
@ -978,12 +979,12 @@ function patch_cmd() {
|
|||
cp -L "$vlfile" "$rfile"
|
||||
done
|
||||
git add -A
|
||||
git commit -qm "$version"
|
||||
[ -n "$(git status --porcelain)" ] && git commit -qm "$version"
|
||||
# basculer vers la branche de version et tenter de merger upstream dans version
|
||||
git checkout -q "v$version"
|
||||
if git merge --no-commit upstream; then
|
||||
if git merge -q --no-commit upstream; then
|
||||
# tout s'est bien passé
|
||||
git commit -qm "v$version --> $profile"
|
||||
[ -n "$(git status --porcelain)" ] && git commit -qm "v$version --> $profile"
|
||||
else
|
||||
# il y a eu une erreur. laisser l'utilisateur décider quoi faire
|
||||
echo >"$rcfile" "#
|
||||
|
@ -1014,7 +1015,9 @@ $(qvals eimportant "Sinon, tapez abort pour arrêter l'intégration de cette ver
|
|||
etitle "Finaliser intégration de la version $version"
|
||||
for vlfile in "${vlfiles[@]}"; do
|
||||
bfile="${vlfile%__pv-${version}__}"
|
||||
chmod +w "$bfile"
|
||||
mv "$vlfile" "$bfile"
|
||||
chmod a-w "$bfile"
|
||||
done
|
||||
eop_version=1
|
||||
VERSION="$version"
|
||||
|
@ -1042,9 +1045,9 @@ $(qvals eimportant "Sinon, tapez abort pour arrêter l'intégration de cette ver
|
|||
ask_yesno "Voulez-vous enregistrer les modifications dans git?" $default || commit=
|
||||
fi
|
||||
if [ -n "$commit" ]; then
|
||||
git add -A && git commit -qm "$msg" || return
|
||||
git add -A && git commit -m "$msg" || return
|
||||
if [ -z "$UTOOLS_VCS_OFFLINE" ]; then
|
||||
git push -q
|
||||
git push
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
@ -1071,6 +1074,7 @@ function add_global__link() {
|
|||
# Création des liens pour $rfile
|
||||
mkdirof "$bfile" || return
|
||||
mv "$pfile" "$bfile" || return
|
||||
chmod a-w "$bfile" || return
|
||||
[ -L "$pfile" ] || ln -sf "$plink" "$pfile" || return
|
||||
mkdirof "$cfile" || return
|
||||
[ -L "$cfile" ] || ln -sf "$clink" "$cfile" || return
|
||||
|
@ -1174,6 +1178,7 @@ function add_local__link() {
|
|||
cp "$Cfile" "$Pfile"
|
||||
else
|
||||
cp "$bfile" "$Pfile"
|
||||
chmod +w "$Pfile"
|
||||
fi
|
||||
# mettre à jour le profil courant
|
||||
setx cfile=get_cfile "$pfile" "$pffdir"
|
||||
|
|
Loading…
Reference in New Issue