Skip to content

Commit

Permalink
3-publish.sh: Commit only modified files
Browse files Browse the repository at this point in the history
  • Loading branch information
es20490446e committed Sep 22, 2024
1 parent e3b5dc5 commit 25bab7b
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions package/3-publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 6,7 @@ files=("optimus-manager.install" "PKGBUILD")


mainFunction () {
checkUncommittedChanges
#checkUncommittedChanges
cloneAurRepo
checkFilesHaveBeenChanged
syncFiles
Expand Down Expand Up @@ -67,6 67,8 @@ cloneAurRepo () {

fileLastCommitDescription () {
local file="${1}"

cd "${here}"
git log -1 --pretty=format:%s -- "${file}"
}

Expand Down Expand Up @@ -110,18 112,15 @@ removeAurRepoClone () {


so () {
local commands="${*}"
local error

if [[ "${verbose}" -eq 1 ]]; then
if ! ${commands}; then
exit "${?}"
fi
elif ! error="$(eval "${commands}" 2>&1 >"/dev/null")" ; then
if [ "${error}" == "" ] ; then
error="Command failed: ${commands}"
if ! error="$(${@} 2>&1 >"/dev/null")" ; then
if [[ -z "${error}" ]] ; then
error="Command failed"
fi

echo "${FUNCNAME[1]}: ${error}" >&2
echo "${FUNCNAME[1]}: ${*}:" >&2
echo "${error}" >&2
exit 1
fi
}
Expand Down Expand Up @@ -157,8 156,9 @@ uploadChanges () {
exit 1
fi

so git add "${files[@]}" ".SRCINFO"
so git commit --message="${description}"
echo "${description}"
echo so git add --all
echo so git commit --message="${description}"
}


Expand Down

0 comments on commit 25bab7b

Please sign in to comment.