File: update.sh

package info (click to toggle)
mymake 2.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 672 kB
  • sloc: cpp: 5,688; lisp: 300; ansic: 195; sh: 86; makefile: 32
file content (33 lines) | stat: -rwxr-xr-x 687 bytes parent folder | download | duplicates (3)
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
#!/bin/bash

echo "Downloading latest version using git..."
git fetch
git checkout master -f
git merge origin/master

if [ ! -e mymake_v2 ]
then
    echo "Warning: Updating to version 2 of mymake, which is incompatible with the previous release."
    echo "Please see README.md for details before upgrading. Run 'update.sh' once more to continue."
    touch mymake_v2
    exit 1
fi

# Compile mymake once again.
if [ -e mymake_new ]
then
    options=$1
fi

echo "Compiling mymake once more..."
./compile.sh mymake_new

if [ -e mymake_new ]
then
    rm mymake
    mv mymake_new mymake
    echo "Compilation succeeded, mymake is updated!"
else
    echo "Compilation failed!"
    exit 1
fi