Application slack

From campisano.org
Jump to navigation Jump to search

Slack

Install

shared/opt install schema v1.2

su -
#### as root
# dependencies
apt-get install curl tar xz-utils binutils gconf2 gconf-service libgtk2.0-0 libudev1 libgcrypt20 libnotify4 libxtst6 libnss3 python gvfs-bin xdg-utils apt-transport-https libxss1 libappindicator1 libcurl3 libsecret-1-0
# binary
DESTINATION="/home/shared/opt/software"                 # Edit when needed
VERSION="4.0.2"                                         # Edit when needed
URL="https://downloads.slack-edge.com/linux_releases/slack-desktop-${VERSION}-amd64.deb"
umask 0027
mkdir -p "${DESTINATION}/tmp"
cd "${DESTINATION}/tmp"
curl -C - -kLO "${URL}"
ar -x "slack-desktop-${VERSION}-amd64.deb"
mkdir "slack-desktop-${VERSION}-amd64"
cd "slack-desktop-${VERSION}-amd64"
tar -xJf ../data.tar.xz
cd "${DESTINATION}"
chown -R root:users "tmp"
find "tmp" -type d -exec chmod a-s,u+rwx,g+rx,g-w,o-rwx {} \;
find "tmp" -type f -exec chmod a-s,u+rw,g+r,g-w,o-rwx {} \;
mv "tmp/slack-desktop-${VERSION}-amd64" "slack-desktop-${VERSION}-amd64"
rm -rf tmp slack
ln -s "slack-desktop-${VERSION}-amd64" slack
exit
#### as final user
SOFTWARE_PATH="/home/shared/opt/software"               # Edit when needed
nice -1 "${SOFTWARE_PATH}/slack/usr/bin/slack"