Browse Source

Implement no sudo apt-to-IROOT function

See #1479
Hamilton Turner 10 years ago
parent
commit
153200f25d
1 changed files with 12 additions and 0 deletions
  1. 12 0
      toolset/setup/linux/bash_functions.sh

+ 12 - 0
toolset/setup/linux/bash_functions.sh

@@ -38,6 +38,18 @@ fw_unzip() {
   rm -f "$@"
 }
 
+# Download *.deb file and install into IROOT without using sudo
+# Does not download dependant packages
+#
+# Example: fw_apt_to_iroot <package> [<directory>]
+fw_apt_to_iroot() {
+  DIR=${2:-$1}
+  echo "Downloading $1 to $IROOT"
+  apt-get download $1
+  echo "Extracting $1 to $DIR"
+  dpkg-deb -x $1*.deb "$IROOT/$DIR" && rm $1*.deb
+}
+
 # Was there an error for the current dependency?
 FW_dep_error=0
 # Have we seen any errors?