From f83c892b1389ffdc90e6348f1e372b2cfd564c4e Mon Sep 17 00:00:00 2001 From: Alex Grintsvayg Date: Wed, 6 Jul 2016 14:13:11 -0400 Subject: [PATCH] fix lbry symlink, fix icon path, add .desktop file to bumpversion --- .bumpversion.cfg | 2 ++ packaging/ubuntu/lbry | 12 +++++++++++- packaging/ubuntu/lbry.desktop | 4 ++-- packaging/ubuntu/ubuntu_package_setup.sh | 2 +- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 83d93855e..59949225b 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -6,3 +6,5 @@ message = Bump version: {current_version} -> {new_version} [bumpversion:file:lbrynet/__init__.py] +[bumpversion:file:packaging/ubuntu/lbry.desktop] + diff --git a/packaging/ubuntu/lbry b/packaging/ubuntu/lbry index 7336ba66b..9d5eafa3f 100755 --- a/packaging/ubuntu/lbry +++ b/packaging/ubuntu/lbry @@ -40,7 +40,17 @@ urlencode() { done } -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +# find true dir of executable +SOURCE="${BASH_SOURCE[0]}" +while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink + DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" + SOURCE="$(readlink "$SOURCE")" + [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located +done +DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" + + if [ -z "$(pgrep lbrynet-daemon)" ]; then echo "running lbrynet-daemon..." $DIR/lbrynet-daemon --branch="$WEB_UI_BRANCH" & diff --git a/packaging/ubuntu/lbry.desktop b/packaging/ubuntu/lbry.desktop index 832d673c3..e918c529f 100644 --- a/packaging/ubuntu/lbry.desktop +++ b/packaging/ubuntu/lbry.desktop @@ -1,8 +1,8 @@ [Desktop Entry] -Version=0.2.2 +Version=0.3.4 Name=LBRY Comment=The world's first user-owned content marketplace -Icon=/usr/share/python/lbrynet/lbrynet/lbrynet_gui/lbry.png +Icon=lbry GenericName=Content Marketplace Categories=Network;Internet;Filesharing Terminal=false diff --git a/packaging/ubuntu/ubuntu_package_setup.sh b/packaging/ubuntu/ubuntu_package_setup.sh index 6c0107c4d..340e7998f 100755 --- a/packaging/ubuntu/ubuntu_package_setup.sh +++ b/packaging/ubuntu/ubuntu_package_setup.sh @@ -148,7 +148,7 @@ function addfile() { FILE="$1" TARGET="$2" mkdir -p "$(dirname "data/$TARGET")" - cp "$FILE" "data/$TARGET" + cp -d "$FILE" "data/$TARGET" echo "$(md5sum "data/$TARGET" | cut -d' ' -f1) $TARGET" >> control/md5sums }