General TC > Programming & Scripting - Unofficial

skype install script

(1/9) > >>

jpeters:
This seems to work for getting skype_2.1.0.47 beta.  Makes a squash tcz extension, and puts it
in /tmp.  

uses bash.tcz


--- Code: ---#!/bin/bash
# Installer of Skype.

set -e

NAME=skype
VERSION=2.1.0.47
DOWNLOAD=http://www.skype.com/go/getskype-linux-beta-static
SOURCE=skype_static-2.1.0.47.tar.bz2
MD5SUM=84cd16086d499b766a6ea9524271c0b9
TMPDIR=/tmp/skypedownload-2.1.0.47
PKG="$TMPDIR"/pkg
LIST="$TMPDIR"/"$NAME".list
SRCDIR=/tmp

download() {
cd "$SRCDIR"
if [ -e "$SOURCE" ]; then
  if [ $(md5sum "$SOURCE" | cut -c1-32) != "$MD5SUM" ]; then
    rm "$SOURCE"
  fi
fi
if [ ! -e "$SOURCE" ]; then
  wget "$DOWNLOAD"/"$SOURCE"
fi
if [ $(md5sum "$SOURCE" | cut -c1-32) = "$MD5SUM" ]; then
  echo "md5sum passed."
else
  echo "Download failed. aborting"
  exit 1;
fi
}


if [ -e "$TMPDIR" ]; then
 rm -r "$TMPDIR"
fi
mkdir -p "$TMPDIR"
if [ ! -e "$PKG"/usr/local/tce.menu ]; then
mkdir -p "$PKG"/usr/local/tce.menu
fi
download &&
tar xzvf "$SRCDIR"/"$SOURCE" -C "$PKG"/usr/local/
mv "$PKG"/usr/local/skype_static-2.1.0.47 "$PKG"/usr/local/skype
mkdir -p "$PKG"/usr/local/tce.menu
echo "<JWM>" > "$PKG"/usr/local/tce.menu/skype
echo "<Program label="\"Skype"\">/usr/local/skype/skype</Program>" >> "$PKG"/usr/local/tce.menu/skype
echo "</JWM>" >> "$PKG"/usr/local/tce.menu/skype
cd "$PKG"
sudo mksquashfs ./ /tmp/skype.tcz

rm -r "$TMPDIR" "$SRCDIR"/"$SOURCE"

echo "skype.tcz is now in your /tmp directory."

sleep 4

--- End code ---


alu:
i must do dumb things, i can't get your script to be executed:

1. i copied the script in a file called skype.sh
2. i copied skype.sh to /usr/local/bin
3. made it executable (sudo chmod +x /usr/local/bin/skype.sh)
4. have the following permission on skype.sh: -rwxr-xr-x
5. sudo skype.sh gives me:

sudo: unable to execute /usr/local/bin/skype.sh: No such file or directory

what am i doing wrong? do i need an extension for tc to run the script?

Juanito:
Do you have the Xlibs_support and fontconfig extensions loaded?

Jason W:
Being a bash script you also need bash installed.

alu:
i have bash, Xlibs_support and fontconfig installed (running mc 2.3) as well as other common extensions (pango, expat2, atk, glib1, glib2, etc.)

Navigation

[0] Message Index

[#] Next page

Go to full version