Welcome to mirror list, hosted at ThFree Co, Russian Federation.

update.sh - github.com/dequis/purple-facebook.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f2f2a381870826217f3701b4dc691a03c3c97d07 (plain)
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
#!/bin/sh

set -e

URL="https://keep.imfreedom.org/pidgin/pidgin"
HASHG=$(_TMP_=$(type hg 2>&1); echo $?)

if test "$HASHG" != "0"; then
    echo "hg (mercurial) not found in PATH" >&2
    exit $HASHG
fi

test -z "$srcdir" && srcdir=$(dirname "$0")
test -z "$srcdir" && srcdir=.
test -z "$pidgindir" && pidgindir=.pidgin

cd "$srcdir"
REVISION=$(cat VERSION)

if ! test -d "$pidgindir/.hg"; then
    rm -rf "$pidgindir"
    hg clone "$URL" "$pidgindir"
fi

hg -R "$pidgindir" -v pull
hg -R "$pidgindir" -v update -C "$REVISION"
rm -rf pidgin

for FILE in $(cat MANIFEST_PIDGIN); do
    mkdir -p $(dirname "pidgin/$FILE")
    cp "$pidgindir/$FILE" "pidgin/$FILE"
done

touch $(cat MANIFEST_VOIDS)

patchdir="$(pwd)/patches"
cd pidgin

for patch in $(ls -1 "$patchdir"); do
    patch -p1 -i "$patchdir/$patch"
done