Skip to content

Commit 651a234

Browse files
committed
Minor refactor of install_ppa()
1 parent 3dcf114 commit 651a234

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

deb-get

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -213,12 +213,11 @@ function install_apt() {
213213
}
214214

215215
function install_ppa() {
216-
local AAR_PARAMS
217-
AAR_PARAMS="-y"
218-
if [ $(dpkg -S $(command -v apt-add-repository)|cut -d: -f1) == "software-properties-common" ] ; then
219-
AAR_PARAMS+=" --no-update";
216+
local AAR_PARAMS="-y"
217+
if [ "$(dpkg -S "$(command -v apt-add-repository)" | cut -d':' -f1)" == "software-properties-common" ]; then
218+
AAR_PARAMS+=" --no-update"
220219
fi
221-
if ${ELEVATE} apt-add-repository $AAR_PARAMS "${PPA}"; then
220+
if ${ELEVATE} apt-add-repository ${AAR_PARAMS} "${PPA}"; then
222221
update_apt
223222
if ! package_is_installed "${APP}"; then
224223
eula

0 commit comments

Comments
 (0)