Skip to content

Commit

Permalink
Merge branch 'fox-forks-hyperupcall-perf' into dev/master
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick330602 committed Jan 7, 2024
2 parents d3e688f + 4dc0017 commit 2cc1c20
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion extras/scripts/manpage_deploy.bash
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if [ ! -d "./website/wslu/man/${wslu_ver}" ] ; then
cp ./docs/*.html ./website/wslu/man/${wslu_ver}
rm -f ./website/wslu/man/*.html
for f in $(ls -d ./website/wslu/man/${wslu_ver}/*.html); do
fname="$(basename ${f})"
fname="${f##*/}"
ln -s ./${wslu_ver}/${fname} ./website/wslu/man/${fname}
done
fi
2 changes: 1 addition & 1 deletion src/wslfetch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ is_generic=0

help_short="wslfetch [-hvcg] [-t THEME] [-o OPTIONS]"

PARSED_ARGUMENTS=$(getopt -a -n "$(basename "$wslu_util_name")" -o hvtcgo: --long help,version,theme,colorbar,generic,options: -- "$@")
PARSED_ARGUMENTS=$(getopt -a -n "${wslu_util_name##*/}" -o hvtcgo: --long help,version,theme,colorbar,generic,options: -- "$@")
#shellcheck disable=SC2181
[ "$?" != "0" ] && help "$wslu_util_name" "$help_short"

Expand Down
3 changes: 2 additions & 1 deletion src/wslgsu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ if [[ "$wa_gs_commd" != "" ]] || [[ $isWakeup -eq 1 ]]; then
# handling no name given case
if [[ "$wa_gs_name" = "" ]]; then
debug_echo "No name given, automatically generate"
wa_gs_name=$(basename "$(echo "$wa_gs_commd" | awk '{print $1}')")
wa_gs_name=$(echo "$wa_gs_commd" | awk '{print $1}')
wa_gs_name=${wa_gs_name##*/}
fi
wa_gs_commd="wsl.exe -d $WSL_DISTRO_NAME -u $wa_gs_user $wa_gs_commd"
wa_gs_dscp="Executing following command \`$wa_gs_name\` from $WSL_DISTRO_NAME when computer start up; Generated By WSL Utilities"
Expand Down
5 changes: 3 additions & 2 deletions src/wslu-header
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

# Current utility
wslu_util_fullpath="$0"
wslu_util_name=$(basename "$wslu_util_fullpath")
wslu_util_name="${wslu_util_fullpath##*/}"

# Version
wslu_version=VERSIONPLACEHOLDER
Expand Down Expand Up @@ -226,7 +226,8 @@ function sysdrive_prefix {
if [ "$(echo "$pt" | wc -l)" -eq 1 ]; then
if [ -d "$pt/Windows/System32" ]; then
hard_reset=1
win_location="$(basename "$pt")"
pt=${pt%/}
win_location="${pt##*/}"
break
fi
fi
Expand Down
8 changes: 4 additions & 4 deletions src/wslusc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ base_converter_engine=${WSLUSC_BASE_CONVERTER_ENGINE:-"imagemagick"}

help_short="wslusc [-IsgN] [-d SHORTCUT_FILE] [-e PATH] [-n NAME] [-i FILE] COMMAND\nwslusc [-hv]"

PARSED_ARGUMENTS=$(getopt -a -n "$(basename "$wslu_util_name")" -o hvd:Ie:n:i:gNs --long help,version,shortcut-debug:,interactive,path:,name:,icon:,gui,native,smart-icon -- "$@")
PARSED_ARGUMENTS=$(getopt -a -n "${wslu_util_name##*/}" -o hvd:Ie:n:i:gNs --long help,version,shortcut-debug:,interactive,path:,name:,icon:,gui,native,smart-icon -- "$@")
#shellcheck disable=SC2181
[ "$?" != "0" ] && help "$wslu_util_name" "$help_short"

Expand Down Expand Up @@ -93,7 +93,7 @@ if [[ "$cname_header" != "" ]]; then
[ -z "$cname_header" ] && error_echo "Bad or invalid input; Aborting" 30

# handling no name given case
new_cname=$(basename "$cname_header")
new_cname="${cname_header##*/}"
# handling name given case
if [[ "$customname" != "" ]]; then
new_cname=$customname
Expand All @@ -114,7 +114,7 @@ if [[ "$cname_header" != "" ]]; then
#handling smart icon first; always first
if [[ "$WSLUSC_SMART_ICON_DETECTION" == "true" ]]; then
if wslpy_check; then
tmp_fcname="$(basename "$cname_header")"
tmp_fcname="${cname_header##*/}"
iconpath="$(python3 -c "import wslpy.__internal__; print(wslpy.__internal__.find_icon(\"$tmp_fcname\"))")"
echo "${info} Icon Detector found icon $tmp_fcname at: $iconpath"
else
Expand All @@ -123,7 +123,7 @@ if [[ "$cname_header" != "" ]]; then
fi

# normal detection section
icon_filename="$(basename "$iconpath")"
icon_filename="${iconpath##*/}"
ext="${iconpath##*.}"

if [[ ! -f $iconpath ]]; then
Expand Down

0 comments on commit 2cc1c20

Please sign in to comment.