Repository navigation
Expand file tree
/
Copy pathnextcloud-update.sh
More file actions
49 lines (44 loc) · 1.55 KB
/
Copy pathnextcloud-update.sh
File metadata and controls
49 lines (44 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash
# Update Nextcloud server & apps from latest git master
# Perfect for local development environment
# Jan-Christoph Borchardt, http://jancborchardt.net
# Change this path if you installed Nextcloud somewhere else
cd $HOME/nextcloud
echo
echo "Updating core ..."
git checkout master
git pull --quiet
echo "core updated. Latest changes:"
git --no-pager log -5 --pretty=format:"%h %Cblue%ar%x09%an %Creset%s"
echo
echo "Removing merged branches ..."
git branch --merged master | grep -v 'master$' | xargs git branch -d
git fetch --prune --quiet
echo
echo "Updating 3rdparty submodule ..."
git submodule update --init
echo
cd apps
for APP in activity bookmarks calendar circles contacts deck files_filter files_pdfviewer files_rightclick files_texteditor files_videoplayer firstrunwizard gallery jsxc.nextcloud logreader mail maps news nextcloud_announcements notes notifications password_policy richdocuments serverinfo socialsharing spreed survey_client tasks user_external
do
if [ -d "$APP" ]; then
echo "Updating $APP ..."
cd $APP
git checkout master
git pull --quiet
echo $APP "updated. Latest changes:"
git --no-pager log -5 --pretty=format:"%h %Cblue%ar%x09%an %Creset%s"
echo
echo "Removing merged branches ..."
git branch --merged master | grep -v 'master$' | xargs git branch -d
git fetch --prune --quiet
cd ..
echo
else
echo "$APP folder not found. If you want to install it clone it first. Otherwise ignore this note."
fi
done
echo
echo "Everything updated!"
echo "Now get coding and fix some bugs! :)"
echo