Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System Update Settings - GitSync Options #266

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sysutils/pfSense-upgrade/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# $FreeBSD$

PORTNAME= pfSense-upgrade
PORTVERSION= 0.9
PORTVERSION= 0.10
CATEGORIES= sysutils
MASTER_SITES= # empty
DISTFILES= # empty
Expand Down
30 changes: 28 additions & 2 deletions sysutils/pfSense-upgrade/files/pfSense-upgrade
Original file line number Diff line number Diff line change
Expand Up @@ -563,11 +563,37 @@ pkg_upgrade() {
repository_url=$(/usr/local/sbin/read_xml_tag.sh string system/gitsync/repositoryurl)
branch=$(/usr/local/sbin/read_xml_tag.sh string system/gitsync/branch)

minimal=$(/usr/local/sbin/read_xml_tag.sh boolean system/gitsync/minimal)
diff=$(/usr/local/sbin/read_xml_tag.sh boolean system/gitsync/diff)
show_files=$(/usr/local/sbin/read_xml_tag.sh boolean system/gitsync/show_files)
show_command=$(/usr/local/sbin/read_xml_tag.sh boolean system/gitsync/show_command)
dryrun=$(/usr/local/sbin/read_xml_tag.sh boolean system/gitsync/dryrun)

mute='mute'
options=''
if [ "${minimal}" = "true" ]; then
options=${options}' --minimal'
fi
if [ "${diff}" = "true" ]; then
options=${options}' --diff'
fi
if [ "${show_files}" = "true" ]; then
options=${options}' --show-files'
mute='off'
fi
if [ "${show_command}" = "true" ]; then
options=${options}' --show-command'
mute='off'
fi
if [ "${dryrun}" = "true" ]; then
options=${options}' --dry-run'
fi

# Repository URL is not mandatory
if [ -n "${branch}" ]; then
_exec "/usr/local/sbin/pfSsh.php playback gitsync \
${repositoryurl} ${branch} --upgrading" \
"Running gitsync" mute ignore_result
${repositoryurl} ${branch} ${options} --upgrading" \
"Running gitsync" ${mute} ignore_result
fi
fi
}
Expand Down