-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate.sh
More file actions
39 lines (31 loc) · 974 Bytes
/
update.sh
File metadata and controls
39 lines (31 loc) · 974 Bytes
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
#Settings
downloadpath="/home/xxxxx/data/drupalversions"
sitepath="/home/xxxxx/domains"
htmlfolder="/html"
scriptdata="/home/xxxxx/data"
# Input for version to dowload
clear
echo "Please enter drupal version to download (ex.: 7.22) : "
read drupalversion
# Download
echo ""
echo "Downloading to $downloadpath/$drupalversion"
echo ""
# Download version
mkdir -p $downloadpath
cd $downloadpath
curl -o drupal-$drupalversion.tar.gz http://ftp.drupal.org/files/projects/drupal-$drupalversion.tar.gz
# Extract
tar -zxf $downloadpath/drupal-$drupalversion.tar.gz
# Input for wbesite to update
echo ""
echo "Please enter sitename to update : "
read sitename
echo ""
# Sync downloaded folder to html folder
rsync -a --progress --exclude='sites/' --exclude='*/.DS_Store' $downloadpath/drupal-$drupalversion/ $sitepath/$sitename$htmlfolder
echo ""
echo "Update complete. You still need to run database updates manually."
echo ""
# Run version script
sh $scriptdata/versions.sh