Compare commits
2 Commits
1a5f2e3222
...
3ac000e49a
| Author | SHA1 | Date | |
|---|---|---|---|
| 3ac000e49a | |||
| cc6e866557 |
14
installJRMC
14
installJRMC
@@ -116,9 +116,9 @@ askOk() {
|
|||||||
}
|
}
|
||||||
execute() {
|
execute() {
|
||||||
if debug "$*"; then
|
if debug "$*"; then
|
||||||
eval "$*"
|
"$@"
|
||||||
else
|
else
|
||||||
eval "$* &>/dev/null"
|
"$@" &>/dev/null
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -142,7 +142,7 @@ parseInput() {
|
|||||||
declare -g CREATEREPO_USER="${CREATEREPO_USER:-$USER}"
|
declare -g CREATEREPO_USER="${CREATEREPO_USER:-$USER}"
|
||||||
|
|
||||||
if [[ $# -eq 0 ]] ||
|
if [[ $# -eq 0 ]] ||
|
||||||
[[ $# -eq 1 && " $1 " =~ ^( --debug | -d )$ ]] &&
|
[[ $# -eq 1 && " $1 " =~ ^( --debug | -d | -y | --yes )$ ]] &&
|
||||||
[[ $ID != "unknown" ]]; then
|
[[ $ID != "unknown" ]]; then
|
||||||
REPO_INSTALL_SWITCH=1
|
REPO_INSTALL_SWITCH=1
|
||||||
elif [[ $# -eq 1 && " $1 " =~ ^( --compat )$ ]]; then
|
elif [[ $# -eq 1 && " $1 " =~ ^( --compat )$ ]]; then
|
||||||
@@ -794,7 +794,7 @@ buildRPM() {
|
|||||||
-bb
|
-bb
|
||||||
"$OUTPUTDIR/SPECS/mediacenter.spec"
|
"$OUTPUTDIR/SPECS/mediacenter.spec"
|
||||||
)
|
)
|
||||||
if execute "${rpmbuild_cmd[*]}" && [[ -f "$MCRPM" ]] ; then
|
if execute "${rpmbuild_cmd[@]}" && [[ -f "$MCRPM" ]] ; then
|
||||||
echo "Build successful. The RPM file is located at: $MCRPM"
|
echo "Build successful. The RPM file is located at: $MCRPM"
|
||||||
else
|
else
|
||||||
err "Build failed"
|
err "Build failed"
|
||||||
@@ -988,10 +988,10 @@ runCreaterepo() {
|
|||||||
# Run createrepo
|
# Run createrepo
|
||||||
cr_cmd=(sudo -u "$CREATEREPO_USER" createrepo -q "$CREATEREPO_WEBROOT")
|
cr_cmd=(sudo -u "$CREATEREPO_USER" createrepo -q "$CREATEREPO_WEBROOT")
|
||||||
[[ -d "$CREATEREPO_WEBROOT/repodata" ]] && cr_cmd+=(--update)
|
[[ -d "$CREATEREPO_WEBROOT/repodata" ]] && cr_cmd+=(--update)
|
||||||
if ! execute "${cr_cmd[*]}"; then
|
if ! execute "${cr_cmd[@]}"; then
|
||||||
cr_cmd=(sudo createrepo -q "$CREATEREPO_WEBROOT")
|
cr_cmd=(sudo createrepo -q "$CREATEREPO_WEBROOT")
|
||||||
[[ -d "$CREATEREPO_WEBROOT/repodata" ]] && cr_cmd+=(--update)
|
[[ -d "$CREATEREPO_WEBROOT/repodata" ]] && cr_cmd+=(--update)
|
||||||
if ! (execute "${cr_cmd[*]}" &&
|
if ! (execute "${cr_cmd[@]}" &&
|
||||||
execute "sudo chown -R $CREATEREPO_USER:$CREATEREPO_USER $CREATEREPO_WEBROOT"); then
|
execute "sudo chown -R $CREATEREPO_USER:$CREATEREPO_USER $CREATEREPO_WEBROOT"); then
|
||||||
err "createrepo failed"
|
err "createrepo failed"
|
||||||
return 1
|
return 1
|
||||||
@@ -1059,7 +1059,7 @@ restoreLicense() {
|
|||||||
|
|
||||||
for f in "$RESTOREFILE" "$newest"; do
|
for f in "$RESTOREFILE" "$newest"; do
|
||||||
if [[ -f "$f" ]]; then
|
if [[ -f "$f" ]]; then
|
||||||
if "mediacenter$MVERSION" "/RestoreFromFile" "$f"; then
|
if execute "mediacenter$MVERSION" "/RestoreFromFile" "$f"; then
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user