/
roaster
executable file
·134 lines (120 loc) · 2.46 KB
/
roaster
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
#!/usr/bin/env bash
# This file is part of the Roaster project
# https://github.com/dmedri/roaster/
# Copyright (c) 2019-2023 Daniele Medri.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Roaster base settings
#
# where I am
RRC=$(pwd)
# R virtual environment location
RVE="$HOME/RVE"
# Roaster home
RCO="$HOME/.roaster"
# Roaster configurations
RCONF="$RCO/confs"
# Roaster server builds home
SRV="/opt/R"
# Ask before build a standard version?
BSTDASK=false
#
# Libraries
#
source lib/libroaster.sh
# Start here
check-roaster-working-dirs
# Roaster build settings
SRCU="$MIRROR/src/base/"
SRCF="R-latest.tar.gz"
SRCD="VERSION-INFO.dcf"
CRANM="CRAN_mirrors.csv"
# Header
roaster-header
# Commands: evaluate status
check-cmdreq {bash,awk,cat,cut,tar,pwd,wget,grep,sudo,vi}
if [[ $RBTYPE = "branch" || $RBTYPE = "trunk" ]]; then
check-cmdreq {svn,git}
fi
# Help menu
while [[ -n "$1" ]]; do
case $1 in
"--status")
check-rstable-latest
check-status
;;
"--mirrors")
roaster-mirrors-list
;;
"--autoclean")
roaster-autoclean
;;
"--factory-reset")
roaster-factory-reset
;;
"--build-settings")
build-settings
;;
"--setup")
roaster-setup
;;
"--svn-repo-branches")
svn-repo-branches
;;
"--svn-repo-update")
svn-repo-update
;;
"--svn-repo-fetch")
svn-repo-fetch
;;
"--set-stable")
set-rbtype-stable
;;
"--set-branch")
set-rbtype-branch
;;
"--set-trunk")
set-rbtype-trunk
;;
"--build-server")
check-rstable-latest
BTYPE="Server (in system)"
BOPTS="$OPTSRV"
R-build-init
R-build-ask
R-build-server
;;
"--build-standard")
check-rstable-latest
BTYPE="Standard (in system)"
BOPTS="$OPTSTD"
R-build-init
R-build-ask
R-build-standard
;;
"--build-virtualenv")
check-rstable-latest
BTYPE="Virtual Environment (in userspace)"
BOPTS="$OPTRVE"
R-build-init
R-build-ask
R-build-virtualenv
;;
"--help")
app-options
;;
esac
shift
done
freemem