How to install DiffMerge properly via a Bash script in Ubuntu Ubuntu 20.04?

Support for our DiffMerge utility.

Moderator: SourceGear

Post Reply
lumeng
Posts: 1
Joined: Mon May 24, 2021 2:03 am

How to install DiffMerge properly via a Bash script in Ubuntu Ubuntu 20.04?

Post by lumeng » Mon May 24, 2021 2:44 am

How to install DiffMerge properly via a Bash script in Ubuntu Ubuntu 20.04?

I followed the instruction at https://sourcegear.com/diffmerge/webhel ... buntu.html and made a Bash script as the following,

Code: Select all

#!/usr/bin/env bash

SOURCEGEAR_LIST_FILE="/etc/apt/sources.list.d/sourcegear.list"
UBUNTU_CODENAME=${$(lsb_release -c)/Codename:/} | xargs
SOURCEGEAR_PACKAGE_STR="deb http://debian.sourcegear.com/ubuntu ${UBUNTU_CODENAME} main"

if [[ -e $SOURCEGEAR_LIST_FILE ]]; then
    if [[ $(< $SOURCEGEAR_LIST_FILE) != "$PACKAGE_STR" ]]; then
        sudo rm $SOURCEGEAR_LIST_FILE
        touch $SOURCEGEAR_LIST_FILE
        sudo cat $SOURCEGEAR_PACKAGE_STR > $SOURCEGEAR_LIST_FILE
        sudo apt-get update
    fi
else
    touch $SOURCEGEAR_LIST_FILE
    cat $SOURCEGEAR_PACKAGE_STR > $SOURCEGEAR_LIST_FILE
    sudo apt-get update
fi
sudo apt-get install diffmerge
where ${UBUNTU_CODENAME} will evaluate to 'focal' on my computer. But the script fails with

Code: Select all

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package diffmerge
Any idea?

Tonya
Posts: 718
Joined: Thu Jan 20, 2005 1:47 pm
Location: SourceGear

Re: How to install DiffMerge properly via a Bash script in Ubuntu Ubuntu 20.04?

Post by Tonya » Tue May 25, 2021 9:04 am

Hello,

At the moment, we don't have a build available for this version of Ubuntu. We are working on a new release that will support this new version. I don't have a time frame in regards to when it will be released yet.

Thanks,

Tonya

Post Reply