Skip to content

Commit

Permalink
update for v0.7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
adelolmo committed Oct 10, 2018
1 parent 0b84822 commit 3cc2c3d
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions package
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ mkdir -p ${TMP} ${RELEASE}

arch=64
if [ -n "$1" ]; then
arch=$1
arch=$1
fi

version=$( wget https://turtlapp.com -O build/turtlhome > /dev/null 2>&1 && cat build/turtlhome | grep -oE "turtl-linux${arch}-[0-9].[0-9].[0-9]" | uniq | grep -Eo "[0-9].[0-9].[0-9]*$" )
if [ -n "$2" ]; then
version=$2
version=$2
if [ ! -n "$2" ]; then
version=$( wget https://turtlapp.com -O build/turtlhome > /dev/null 2>&1 && cat build/turtlhome | grep "linux$arch"|uniq| grep -oE "v.*/"|sed 's/v//g;s/\///g' )
fi

echo "* Retrieve artifact ${arch} ${version} ..."
[ -f /tmp/turtl-linux${arch}.tar.bz2 ] || wget -O /tmp/turtl-linux${arch}.tar.bz2 https://turtlapp.com/releases/desktop/turtl-linux${arch}-${version}.tar.bz2
[ -f /tmp/turtl-linux${arch}.tar.bz2 ] || wget -O /tmp/turtl-linux${arch}.tar.bz2 https://github.com/turtl/desktop/releases/download/v${version}/turtl-${version}-linux${arch}.tar.bz2

echo "* Extract tar ..."
tar xf /tmp/turtl-linux${arch}.tar.bz2 -C build
Expand Down Expand Up @@ -49,13 +49,6 @@ EOF
echo "* Copy content ..."
cp -r build/turtl-linux${arch}/turtl/* ${TMP}/usr/share/turtl

echo "* Fix files permissions ..."
chmod 0644 ${TMP}/usr/share/turtl/*
chmod 0755 ${TMP}/usr/share/turtl/turtl ${TMP}/usr/share/turtl/turtl-bin ${TMP}/usr/share/turtl/chromedriver ${TMP}/usr/share/turtl/nacl* ${TMP}/usr/share/turtl/nwjc ${TMP}/usr/share/turtl/payload
chmod 0755 ${TMP}/usr/share/turtl/locales ${TMP}/usr/share/turtl/lib ${TMP}/usr/share/turtl/pnacl
chmod 0644 ${TMP}/usr/share/turtl/locales/* ${TMP}/usr/share/turtl/pnacl/*
chmod 0755 ${TMP}/usr/share/turtl/lib/*

echo "* Create debian package ..."
size=$(du -cs ${TMP} | sed '1!d' | grep -oe "^[0-9]*")
[ "$arch" = 64 ] && architecture="amd64"
Expand Down

0 comments on commit 3cc2c3d

Please sign in to comment.