浏览代码

Merge pull request #1839 from blee-techempower/blee-update-bashscript

Update bash_functions.sh
Nate 10 年之前
父节点
当前提交
05370c1b61
共有 1 个文件被更改,包括 7 次插入5 次删除
  1. 7 5
      toolset/setup/linux/bash_functions.sh

+ 7 - 5
toolset/setup/linux/bash_functions.sh

@@ -42,16 +42,18 @@ fw_unzip() {
   rm -f "$@"
 }
 
-# Download *.deb file and install into IROOT without using sudo
-# Does not download dependant packages
-#
+# Download *.deb file and install into IROOT 
+# Cautions:
+#   Without using sudo,
+#   Does not download dependant packages.
+#   script will be stuck and will not make progress. (e.g: CSharp/nancy)
 # Example: fw_apt_to_iroot <package> [<directory>]
 fw_apt_to_iroot() {
   DIR=${2:-$1}
   echo "Downloading $1 to $IROOT"
-  apt-get download $1
+  sudo apt-get download $1
   echo "Extracting $1 to $DIR"
-  dpkg-deb -x $1*.deb "$IROOT/$DIR" && rm $1*.deb
+  sudo dpkg-deb -x $1*.deb "$IROOT/$DIR" && sudo rm $1*.deb
 }
 
 # Was there an error for the current dependency?