#!/bin/bash

var=$1
echo "variable: $var"

case ${var##*.} in # extrait l'extension
 gz)
   echo archive gz
   gzunpack ${var}
   ;;
 zip)
   echo archive zip
   pkunzip ${var}
   ;;
 *)
   echo archive non reconnue
   exit
   ;;
 esac

