Browse Source

Fixed edit in place

Joachim M. Giæver 5 years ago
parent
commit
cefe36db47
2 changed files with 11 additions and 10 deletions
  1. 10 9
      bin/lxcbuild
  2. 1 1
      snap/snapcraft.yaml

+ 10 - 9
bin/lxcbuild

@@ -132,17 +132,18 @@ if [ $? -ne 0 ]; then
 else
 	cprint "Pulling repo"
 	git pull
-	TAG=$(git tag | tail -n 1)
-	while true; do 
-		read -p "Check out latest tag ${TAG}? Y/N/M (M=master): " A
-		case ${A} in 
-			[Yy]* ) git checkout "${TAG}"; break;;
-			[Nn]* ) cprint "info" "Not checking out anything"; break;;
-			[Mm]* ) git checkout master
-		esac
-	done
 fi
 
+TAG=$(git tag | tail -n 1)
+while true; do 
+	read -p "Check out latest tag ${TAG}? Y=yes, M=master, Enter=no change: " A
+	case ${A} in 
+		[Yy]* ) container_sh "git checkout ${TAG}"; break;;
+		[Mm]* ) container_sh "git checkout master"; break;;
+		* ) cprint "info" "Not checking out anything"; break;;
+	esac
+done
+
 cprint "info" "Building snap"
 RET=-1
 if [ "$(container_sh "ls $(container_home)/${CONTAINER_NAME} | grep prime | wc -l")" == "1" ]; then

+ 1 - 1
snap/snapcraft.yaml

@@ -51,7 +51,7 @@ parts:
             INSTEONPLM=$(basename "$(ls ${PPACKAGES} | grep insteonplm --max-count=1)")
             echo "* Extracting ${INSTEONPLM}"
             SCFG=$(tar -xvzf "${PPACKAGES}/${INSTEONPLM}" | grep setup.cfg --max-count=1)
-            sed '/^license_file/d' "${SCFG}" > ${SCFG}
+            sed -i '/^license_file/d' "${SCFG}"
             echo "* Compressing ${INSTEONPLM}"
             tar -zcf "${PPACKAGES}/${INSTEONPLM}" $(dirname "${SCFG}")
             echo "* Updated ${INSTEONPLM}"