WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: skype install script  (Read 24219 times)

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
skype install script
« on: September 30, 2009, 01:05:49 AM »
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: [Select]
#!/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


« Last Edit: October 01, 2009, 10:07:05 AM by jpeters »

Offline alu

  • Sr. Member
  • ****
  • Posts: 429
Re: skype install script
« Reply #1 on: October 01, 2009, 03:57:03 AM »
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?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: skype install script
« Reply #2 on: October 01, 2009, 04:22:09 AM »
Do you have the Xlibs_support and fontconfig extensions loaded?

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: skype install script
« Reply #3 on: October 01, 2009, 04:33:01 AM »
Being a bash script you also need bash installed.

Offline alu

  • Sr. Member
  • ****
  • Posts: 429
Re: skype install script
« Reply #4 on: October 01, 2009, 05:36:19 AM »
i have bash, Xlibs_support and fontconfig installed (running mc 2.3) as well as other common extensions (pango, expat2, atk, glib1, glib2, etc.)

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: skype install script
« Reply #5 on: October 01, 2009, 06:21:43 AM »
are you using "./" ?    (eg, sudo ./skype.sh)
« Last Edit: October 01, 2009, 06:31:14 AM by jpeters »

Offline alu

  • Sr. Member
  • ****
  • Posts: 429
Re: skype install script
« Reply #6 on: October 01, 2009, 07:57:40 AM »
yep, also did that (cd to /usr/local/bin where the skype.sh script is, then: sudo ./skype.sh) with same result; don't know what i am missing

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: skype install script
« Reply #7 on: October 01, 2009, 09:17:08 AM »
yep, also did that (cd to /usr/local/bin where the skype.sh script is, then: sudo ./skype.sh) with same result; don't know what i am missing

What happens if you copy script to your $HOME directory, "sudo chown tc:staff skype.sh" and run without sudo  eg "./skype.sh" while in $HOME.  Also, script will work with #!/bin/ash.  Make sure it copied/pasted correctly.  When I paste, often the first line doesn't make it, or there's a few characters missing.
« Last Edit: October 01, 2009, 09:42:07 AM by jpeters »

Offline alu

  • Sr. Member
  • ****
  • Posts: 429
Re: skype install script
« Reply #8 on: October 01, 2009, 09:52:39 AM »
i have copied skype.sh to home and changed owner to tc:staff with no result; the first line in the script is:

!/bin/bash

i think it should work since bash has been installed

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: skype install script
« Reply #9 on: October 01, 2009, 09:54:04 AM »
i have copied skype.sh to home and changed owner to tc:staff with no result; the first line in the script is:

!/bin/bash

i think it should work since bash has been installed

should be "#!/bin/bash"    That would do it.   I have the same issue with pasting  :)      

I added a download link..
« Last Edit: October 01, 2009, 10:08:43 AM by jpeters »

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: skype install script
« Reply #10 on: October 01, 2009, 12:00:18 PM »
This script adds "/usr/local/bin/skype" script  (so it runs from terminal)

Code: [Select]
#!/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"
######## Add Script

SCRIPT="usr/local/bin/skype"
sudo mkdir "usr/local/bin"
sudo echo "#!/bin/sh" >>"$SCRIPT"
sudo echo "/usr/local/skype/skype" >>"$SCRIPT"
sudo echo  "exit 0" >>"$SCRIPT"
sudo chmod +x "$SCRIPT"

####################
sudo mksquashfs ./ /tmp/skype.tcz

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

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

sleep 4


« Last Edit: October 01, 2009, 12:10:43 PM by jpeters »

Offline alu

  • Sr. Member
  • ****
  • Posts: 429
Re: skype install script
« Reply #11 on: October 01, 2009, 11:24:10 PM »
thanks a lot for your new script, i can make it executable, everything works fine

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: skype install script
« Reply #12 on: October 02, 2009, 12:10:58 AM »
thanks a lot for your new script, i can make it executable, everything works fine

I see you even cut/pasted it  :D

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: skype install script
« Reply #13 on: October 20, 2009, 11:46:55 PM »
necessary skype_support libs  (included in Xlibs_support).  

usr/local/lib/libXss.so
usr/local/lib/libXss.so.1
usr/local/lib/libXss.so.1.0.0
usr/local/lib/libXv.so
usr/local/lib/libXv.so.1
usr/local/lib/libXv.so.1.0.0


If running OSS, needs libasound.tczl
edit: Present version might require alsa

« Last Edit: November 27, 2009, 02:50:19 AM by jpeters »

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: skype install script
« Reply #14 on: November 17, 2009, 07:14:18 PM »
Updated script.  Downloads &  builds skype.tcz in /tmp.  Run skype from  menu or terminal.      

Code: [Select]
#!/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 xjvf "$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"
######## Add Script
mkdir   usr/local/bin
sudo chmod 775 usr/local/bin
cat <<EOF> usr/local/bin/skype
#!/bin/sh
/usr/local/skype/skype
exit 0
EOF

sudo chmod +x usr/local/bin/skype


sudo chown -R root:staff ./
sudo chmod 775 usr/local/tce.*  

####################
sudo mksquashfs ./ /tmp/skype.tcz

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

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

sleep 4


« Last Edit: November 17, 2009, 07:18:37 PM by jpeters »