""")
EOF
-python pwb.py ${mwfamily}_setup
+# this can spam a warning, so uniq it
+python pwb.py ${mwfamily}_setup |& uniq
</source>
#!/bin/bash
source ~/mw_vars
cd $mw
-git fetch --all
-git checkout origin/$mw_branch
-cd $mw/skins/Vector
-git fetch --all -q
-x=ian-kelling/REL1_27-toolbox-in-dropdown
-log=$(git log HEAD..$x)
-if [[ $log ]]; then
- pwd
- echo "$log"
-fi
-git checkout -q $x
-cd $mw/extensions
-for x in *; do
- [[ -d $x ]] || continue
- cd $x
+for dir in extensions/* skins/* $mw; do
+ [[ -d $dir ]] || continue
+ cd $dir
+ branch=$(git describe --all)
+ branch=${branch#remotes/}
git fetch --all -q
- x=$(git rev-parse origin/$mw_branch 2>/dev/null) || \
- x=$(git rev-parse origin/master)
- log=$(git log HEAD..$x)
+ new_head=$(git rev-parse $branch)
+ log=$(git log HEAD..$new_head)
if [[ $log ]]; then
pwd
echo "$log"
fi
- git checkout -q $x
- cd ..
+ git checkout -q $new_head
+ cd $mw
done
php $mw/maintenance/update.php -q
EOF
""")
EOF
-python pwb.py ${mwfamily}_setup
+# this can spam a warning, so uniq it
+python pwb.py ${mwfamily}_setup |& uniq
# </source>
# <source lang="bash">
s=/etc/cron.daily/mediawiki_update
#!/bin/bash
source ~/mw_vars
cd $mw
-git fetch --all
-git checkout origin/$mw_branch
-cd $mw/skins/Vector
-git fetch --all -q
-x=ian-kelling/REL1_27-toolbox-in-dropdown
-log=$(git log HEAD..$x)
-if [[ $log ]]; then
- pwd
- echo "$log"
-fi
-git checkout -q $x
-cd $mw/extensions
-for x in *; do
- [[ -d $x ]] || continue
- cd $x
+for dir in extensions/* skins/* $mw; do
+ [[ -d $dir ]] || continue
+ cd $dir
+ branch=$(git describe --all)
+ branch=${branch#remotes/}
git fetch --all -q
- x=$(git rev-parse origin/$mw_branch 2>/dev/null) || \
- x=$(git rev-parse origin/master)
- log=$(git log HEAD..$x)
+ new_head=$(git rev-parse $branch)
+ log=$(git log HEAD..$new_head)
if [[ $log ]]; then
pwd
echo "$log"
fi
- git checkout -q $x
- cd ..
+ git checkout -q $new_head
+ cd $mw
done
php $mw/maintenance/update.php -q
EOF