File tree Expand file tree Collapse file tree 1 file changed +28
-6
lines changed
Expand file tree Collapse file tree 1 file changed +28
-6
lines changed Original file line number Diff line number Diff line change @@ -67,12 +67,34 @@ corlib_dir=""
6767
6868# Special case: program is launched via Steam
6969# In that case rerun the script via their bootstrapper to ensure Steam overlay works
70- if [ " $2 " = " SteamLaunch" ]; then
71- steam=" $1 $2 $3 $4 $0 $5 "
72- shift 5
73- $steam " $@ "
74- exit
75- fi
70+ for a in " $@ " ; do
71+ case " $a " in
72+ SteamLaunch)
73+ rotated=0; max=$#
74+ while [ $rotated -lt $max ]; do
75+ case " $1 " in
76+ * $executable_name )
77+ to_rotate=$(( $# - rotated))
78+ set -- " $@ " " $0 "
79+ while [ $(( to_rotate-= 1 )) -ge 0 ]; do
80+ set -- " $@ " " $1 "
81+ shift
82+ done
83+ exec " $@ "
84+ ;;
85+ * )
86+ set -- " $@ " " $1 "
87+ shift
88+ rotated=$(( rotated+ 1 ))
89+ ;;
90+ esac
91+ done
92+ exit 1
93+ ;;
94+ * )
95+ ;;
96+ esac
97+ done
7698
7799# Handle first param being executable name
78100if [ -x " $1 " ] ; then
You can’t perform that action at this time.
0 commit comments