ns-tools

Namespace utilities to reuse Open Source packaging efforts.
git clone git://r-36.net/ns-tools
Log | Files | Refs | README | LICENSE

ns-copy-intel-ucode (404B)


      1 #!/bin/sh
      2 
      3 if [ $# -lt 1 ];
      4 then
      5 	printf "usage: %s ns\n" "$(basename $0)" >&2
      6 	exit 1
      7 fi
      8 
      9 firmwarepath="/usr/lib/firmware/intel-ucode"
     10 nsroot="$(ns-root "$1")"
     11 
     12 if [ ! -d "${nsroot}${firmwarepath}" ];
     13 then
     14 	printf "No '%s' in '%s' found.\n" \
     15 		"${firmwarepath}" "${nsroot}" 2>&1
     16 	exit 1
     17 fi
     18 
     19 [ ! -d "${firmwarepath}" ] && mkdir -p "${firmwarepath}"
     20 
     21 cp -rf ${nsroot}${firmwarepath}/* "${firmwarepath}"
     22