wok diff get-realplayer/stuff/get-realplayer @ rev 21314
5) lxpanel: up (0.10.0)
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Thu Apr 18 17:46:06 2019 +0300 (2019-04-18) |
parents | 59de7d3d7152 |
children |
line diff
1.1 --- a/get-realplayer/stuff/get-realplayer Sat Feb 12 06:26:12 2011 +0000 1.2 +++ b/get-realplayer/stuff/get-realplayer Thu Apr 18 17:46:06 2019 +0300 1.3 @@ -1,4 +1,4 @@ 1.4 -#!/bin/sh 1.5 +#!/bin/sh 1.6 1.7 # Get and install RealPlayer for Linux 1.8 1.9 @@ -6,32 +6,32 @@ 1.10 VERSION="11" 1.11 TARBALL="RealPlayer${VERSION}GOLD.bin" 1.12 URL="http://www.real.com/realcom/R?href=http://forms.real.com/real/player/download.html?f=unix/$TARBALL" 1.13 -CUR_DIR=$(pwd) 1.14 -TEMP_DIR=/tmp/$PACKAGE-$VERSION-$$ 1.15 +CUR_DIR="$(pwd)" 1.16 +TEMP_DIR="$(mktemp -d)" 1.17 ROOT="$1" 1.18 1.19 # Check if we are root 1.20 -if test $(id -u) != 0 ; then 1.21 - echo -e "\nYou must be root to run `basename $0`." 1.22 +if [ $(id -u) -ne 0 ]; then 1.23 + echo -e "\nYou must be root to run $(basename $0)." 1.24 echo -e "Please type 'su' and root password to become super-user.\n" 1.25 + rm -rf "$TEMP_DIR" 1.26 exit 1 1.27 fi 1.28 1.29 # Avoid reinstall 1.30 -if [ -d $ROOT/var/lib/tazpkg/installed/$PACKAGE ]; then 1.31 +if [ -d "$ROOT/var/lib/tazpkg/installed/$PACKAGE" ]; then 1.32 echo -e "\n$PACKAGE package is already installed.\n" 1.33 + rm -rf "$TEMP_DIR" 1.34 exit 1 1.35 fi 1.36 1.37 -# Create a TEMP_DIR 1.38 -mkdir $TEMP_DIR 1.39 -cd $TEMP_DIR 1.40 +cd "$TEMP_DIR" 1.41 1.42 # Download the file 1.43 -wget $URL 1.44 +wget $URL 1.45 if [ ! -f $TARBALL ]; then 1.46 cd $CUR_DIR 1.47 - rm -rf $TEMP_DIR 1.48 + rm -rf "$TEMP_DIR" 1.49 echo "Could not download $TARBALL. Exiting." 1.50 exit 1 1.51 fi 1.52 @@ -60,16 +60,12 @@ 1.53 1.54 post_install() 1.55 { 1.56 - echo -n "Processing post install commands..." 1.57 ln -s /usr/lib/RealPlayer/mozilla/nphelix.so /usr/lib/firefox*/plugins 1.58 - status 1.59 } 1.60 1.61 post_remove() 1.62 { 1.63 - echo -n "Processing post remove commands..." 1.64 rm -f /usr/lib/firefox*/plugins/nphelix.so 1.65 - status 1.66 } 1.67 EOT 1.68 1.69 @@ -90,4 +86,4 @@ 1.70 1.71 # Clean 1.72 cd $CUR_DIR 1.73 -rm -rf $TEMP_DIR 1.74 +rm -rf "$TEMP_DIR"