Last change
on this file since 3819 was 3759, checked in by Bruno Cornec, 4 years ago |
test and debug
|
-
Property svn:eol-style
set to
native
-
Property svn:executable
set to
*
|
File size:
984 bytes
|
Line | |
---|
1 | #!/bin/bash
|
---|
2 | #
|
---|
3 | # Script to automate mageia docker images creation.
|
---|
4 | #
|
---|
5 |
|
---|
6 | # Variables management
|
---|
7 | WORKDIR=$HOME/tmp
|
---|
8 | if [ -f $HOME/.mageia-docker ]; then
|
---|
9 | . $HOME/.mageia-docker
|
---|
10 | fi
|
---|
11 | if [ _"$GITDIR" = _"" ]; then
|
---|
12 | GITDIR=$HOME/mageia-docker
|
---|
13 | fi
|
---|
14 |
|
---|
15 | # Cleanup before doing anything
|
---|
16 | sudo rm -rf $GITDIR
|
---|
17 |
|
---|
18 | # Clone again from git
|
---|
19 | git clone -q git@github.com:bcornec/mageia-docker.git $GITDIR
|
---|
20 | if [ $? -ne 0 ]; then
|
---|
21 | git clone -q https://github.com/bcornec/mageia-docker.git $GITDIR
|
---|
22 | if [ $? -ne 0 ]; then
|
---|
23 | exit -1
|
---|
24 | fi
|
---|
25 | fi
|
---|
26 |
|
---|
27 | opt=""
|
---|
28 | # Detect mirror server if any
|
---|
29 | if [ _"$1" = _"-f" ]; then
|
---|
30 | opt="-f"
|
---|
31 | shift
|
---|
32 | fi
|
---|
33 | if [ _"$1" != _"" ]; then
|
---|
34 | opt="$opt -m $1"
|
---|
35 | fi
|
---|
36 |
|
---|
37 | # Launch script
|
---|
38 | for v in 5 6 cauldron; do
|
---|
39 | sudo rm -rf $WORKDIR/$v
|
---|
40 | echo "---------------------------"
|
---|
41 | bash -x /users/bruno/prj/mageia-docker/mageia-docker -v $v -w $WORKDIR $opt
|
---|
42 | #$GITDIR/mageia-docker -v $v -w $WORKDIR $opt
|
---|
43 | sudo rm -rf $WORKDIR/$v
|
---|
44 | done
|
---|
45 |
|
---|
46 | # Clean after run in Docker
|
---|
47 | docker container prune -f
|
---|
48 | docker image prune -f
|
---|
49 | docker images
|
---|
Note:
See
TracBrowser
for help on using the repository browser.