Procházet zdrojové kódy

Fixed to many arg error

Joachim M. Giæver před 5 roky
rodič
revize
77604637d0
1 změnil soubory, kde provedl 2 přidání a 3 odebrání
  1. 2 3
      bin/lxcbuild

+ 2 - 3
bin/lxcbuild

@@ -24,7 +24,7 @@ function cprint {
 }
 
 function container_sh {
-	if [ $# -eq 1 ]; then
+	if [ $# -eq 1 ]; then
 		cprint "info" "${1}"
 	fi
 	lxc exec ${CONTAINER_NAME} -- sh -c "${1}"
@@ -143,9 +143,8 @@ else
 fi
 
 cprint "info" "Building snap"
-
 RET=-1
-if [ $(container_snap_sh "ls | grep prime | wc -l") -ne 0 ]; then
+if [ "$(container_sh "ls $(container_home)/${CONTAINER_NAME} | grep prime | wc -l")" == "1" ]; then
 	container_snap_sh "snapcraft prime --destructive-mode"
 	if [ $? -ne 0 ]; then
 		container_snap_sh "snapcraft clean --destructive-mode"