summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/files/toolchain-shar-extract.sh15
1 files changed, 12 insertions, 3 deletions
diff --git a/meta/files/toolchain-shar-extract.sh b/meta/files/toolchain-shar-extract.sh
index 9279310376..434510470b 100644
--- a/meta/files/toolchain-shar-extract.sh
+++ b/meta/files/toolchain-shar-extract.sh
@@ -47,7 +47,8 @@ relocate=1
47savescripts=0 47savescripts=0
48verbose=0 48verbose=0
49publish=0 49publish=0
50while getopts ":yd:npDRS" OPT; do 50listcontents=0
51while getopts ":yd:npDRSl" OPT; do
51 case $OPT in 52 case $OPT in
52 y) 53 y)
53 answer="Y" 54 answer="Y"
@@ -72,6 +73,9 @@ while getopts ":yd:npDRS" OPT; do
72 S) 73 S)
73 savescripts=1 74 savescripts=1
74 ;; 75 ;;
76 l)
77 listcontents=1
78 ;;
75 *) 79 *)
76 echo "Usage: $(basename $0) [-y] [-d <dir>]" 80 echo "Usage: $(basename $0) [-y] [-d <dir>]"
77 echo " -y Automatic yes to all prompts" 81 echo " -y Automatic yes to all prompts"
@@ -83,11 +87,18 @@ while getopts ":yd:npDRS" OPT; do
83 echo " -S Save relocation scripts" 87 echo " -S Save relocation scripts"
84 echo " -R Do not relocate executables" 88 echo " -R Do not relocate executables"
85 echo " -D use set -x to see what is going on" 89 echo " -D use set -x to see what is going on"
90 echo " -l list files that will be extracted"
86 exit 1 91 exit 1
87 ;; 92 ;;
88 esac 93 esac
89done 94done
90 95
96payload_offset=$(($(grep -na -m1 "^MARKER:$" $0|cut -d':' -f1) + 1))
97if [ "$listcontents" = "1" ] ; then
98 tail -n +$payload_offset $0| tar tvJ || exit 1
99 exit
100fi
101
91titlestr="@SDK_TITLE@ installer version @SDK_VERSION@" 102titlestr="@SDK_TITLE@ installer version @SDK_VERSION@"
92printf "%s\n" "$titlestr" 103printf "%s\n" "$titlestr"
93printf "%${#titlestr}s\n" | tr " " "=" 104printf "%${#titlestr}s\n" | tr " " "="
@@ -187,8 +198,6 @@ if [ ! -x $target_sdk_dir -o ! -w $target_sdk_dir -o ! -r $target_sdk_dir ]; the
187 $SUDO_EXEC mkdir -p $target_sdk_dir >/dev/null 2>&1 198 $SUDO_EXEC mkdir -p $target_sdk_dir >/dev/null 2>&1
188fi 199fi
189 200
190payload_offset=$(($(grep -na -m1 "^MARKER:$" $0|cut -d':' -f1) + 1))
191
192printf "Extracting SDK..." 201printf "Extracting SDK..."
193tail -n +$payload_offset $0| $SUDO_EXEC tar xJ -C $target_sdk_dir --checkpoint=.2500 $EXTRA_TAR_OPTIONS || exit 1 202tail -n +$payload_offset $0| $SUDO_EXEC tar xJ -C $target_sdk_dir --checkpoint=.2500 $EXTRA_TAR_OPTIONS || exit 1
194echo "done" 203echo "done"