debmaker/debmaker

57 lines
806 B
Bash
Executable File

#!/bin/bash
source ./lib/function.sh
ACTION=$1
case $ACTION in
list)
ls ressources
exit
;;
esac
while [ ! -z $2 ]
do
shift
case $ACTION in
run)
if [ -e ressources/$1/debmaker ]
then
. ressources/$1/debmaker
debmaker_run
if [ $? -ne 0 ]
then
echo erreur lors de la génération
exit
fi
else
echo no $1 project
fi
;;
edit)
if [ -e ressources/$1/debmaker ]
then
nano ressources/$1/debmaker
else
echo no $1 project
fi
;;
chroot)
if [ -e ressources/$1/debmaker ]
then
if [ -e cache/$1 ]
then
. ressources/$1/debmaker
debmaker_chroot
else
echo no cache file
fi
else
echo no $1 project
fi
;;
*)
echo "debmaker [list] [chroot app] [run <app>] [edit <app>]"
exit
;;
esac
done