Linux OS의 실행 파일에 바로 가기를 추가하는 Bash 스크립트.
컴퓨터에서 레포를 복제하거나 코드를 "goodtopfy.sh"파일 내부에 복사하십시오.
컴퓨터에서 전 세계적으로 실행하려면 파일 이름을 바꾸고 파일 이름에서 ".sh"를 제거하십시오.
mv /path/to/script/desktopfy.sh /path/to/script/desktopfy그런 다음 컴퓨터의 Binaries 위치 안에 새 파일을 이동하십시오. "~/.local/bin"내부로 이동하는 것이 좋습니다.
mv /path/to/script/desktopfy ~ /.local/bin입장
우선, 컴퓨터의 스크립트에 액세스하는 방법을 확인해야합니다.
1.1. 글로벌 액세스
설치 자습서에 설명 된대로 Global Access (Bin Dir 내부)를 구성한 경우 다음으로 전화하십시오.
desktopfy1.2. 로컬 액세스
전화하려면 스크립트가 포함 된 파일 내부로 이동하고 다음을 사용하여 호출하십시오.
mv /path/to/script./desktopfy.sh또는 절대 경로를 사용하여 호출하십시오.
/path/to/script/desktopfy.sh논쟁
Desktopfy는 작동하려면 4 가지 위치 인수가 필요합니다.
이름 (-n) : 응용 프로그램 이름.
여러 단어의 경우 ""( "일부") 내부를 감싸십시오.
특수 문자 사용을 피하고 문자 ([az] | [az]), 숫자 ([0-9]) 및 공간 ( ""만 사용하십시오.
실행 파일 (-e) : 실행 파일로가는 경로.
절대 경로를 사용하는 것이 좋습니다 ( "/the/complete/path/to/file.appimage").
".appimage"파일의 사용을 권장하십시오.
파일 이름 만 사용되면 스크립트는 작동중인 DIR로 완성됩니다.
아이콘 (-i) : 이미지 썸네일의 경로.
절대 경로를 사용하는 것이 좋습니다 ( "/the/complete/path/to/image.ico").
".ico"파일의 사용을 권장하십시오.
파일 이름 만 사용되면 스크립트는 작동중인 DIR로 완성됩니다.
터미널 (-t) : 실행시 터미널이 표시되는지를 나타냅니다.
"false"문자열 인수의 "true"만 허용됩니다.
다른 입력을 "오류"로 올리십시오.
예제는 "Balena Etcher"에 대한 지름길을 추가하는 프로세스입니다.
desktopfy -n balena -e ~ /balena_etcher/etcher/balenaEtcher-1.7.8-x64.AppImage -i ~ /balena_etcher/etcher/etcher.ico -t false Creating " balena " as balena.desktop
" balena " was created as balena.desktopdesktopfy -n " balena etcher " -e ~ /balena_etcher/etcher/balenaEtcher-1.7.8-x64.AppImage -i ~ /balena_etcher/etcher/etcher.ico -t false Creating " balena etcher " as " balena_etcher.desktop "
" balena etcher " was created as " balena_etcher.desktop "mv ~ /balena_etcher/etcherdesktopfy -n " balena etcher " -e balenaEtcher-1.7.8-x64.AppImage -i etcher.ico -t false Creating " balena etcher " as " balena_etcher.desktop "
" balena etcher " was created as " balena_etcher.desktop "desktopfy -n " BaleNa 2etcher " -e ~ /balena_etcher/etcher/balenaEtcher-1.7.8-x64.AppImage -i ~ /balena_etcher/etcher/etcher.ico -t false Creating " BaleNa 2etcher " as " balena_2etcher.desktop "
" BaleNa 2etcher " was created as " balena_2etcher.desktop "desktopfy -n " balena etcher " -e ~ /balena_etcher/etcher/balenaEtcher-1.7.8-x64.AppImage -i ~ /balena_etcher/etcher/etcher.ico -t false아니요 ( "N") :
Creating " balena etcher " " as balena_etch.desktop "
" balena_etch.desktop " already exists among the shortcuts, do you want to overwrite file ? [y/n]: n
Stoping process예 ( "Y") :
Creating " balena etcher " as " balena_etch.desktop "
" balena_etch.desktop " already exists among the shortcuts, do you want to overwrite file ? [y/n]: y
" balena etcher " was created as " balena_etcher.desktop "desktopfy -n " balena_etcher " -e ~ /balena_etcher/etcher/balenaEtcher-1.7.8-x64.AppImage -i ~ /balena_etcher/etcher/etcher.ico -t invalidArgumentError: Invalid name " balena_etcher "
Usage: desktopfy [-n < programm_name > ] [-e < executable_path > ] [-i < icon_path > ] [-t < true | false > ]
-n Name of the program, for multiple words need to start and end with " " (ex. " some thing " )
(Avoid the use of special characters as * , / or others similar)
-e Path to the .AppImage, .bin or executable file gonna be used for execution
(If only name is provided, the current dir gonna be used as parent)
-i Path to the .ico, .png or other image file that gonna be used for icon
(If only name is provided, the current dir gonna be used as parent)
-t Declare if the terminal it ' s gonna be showed when executing the program
(Only "true" or "false" arguments are accepted)desktopfy -n " balena etcher " -e ~ /balena_etcher/etcher/falseBalena.AppImage -i ~ /balena_etcher/etcher/etcher.ico -t false Error: " ~/balena_etcher/etcher/falseBalena.AppImage " doesn ' t exist
Usage: desktopfy [-n <programm_name>] [-e <executable_path>] [-i <icon_path>] [-t <true|false>]
-n Name of the program, for multiple words need to start and end with "" (ex. "some thing")
(Avoid the use of special characters as *, / or others similar)
-e Path to the .AppImage, .bin or executable file gonna be used for execution
(If only name is provided, the current dir gonna be used as parent)
-i Path to the .ico, .png or other image file that gonna be used for icon
(If only name is provided, the current dir gonna be used as parent)
-t Declare if the terminal it ' s gonna be showed when executing the program
(Only " true " or " false " arguments are accepted)desktopfy -n " balena etcher " -e ~ /balena_etcher/etcher/balenaEtcher-1.7.8-x64.AppImage -i ~ /balena_etcher/etcher/falseEtcher.ico -t false Error: " ~/balena_etcher/etcher/falseEtcher.ico " doesn ' t exist
Usage: desktopfy [-n <programm_name>] [-e <executable_path>] [-i <icon_path>] [-t <true|false>]
-n Name of the program, for multiple words need to start and end with "" (ex. "some thing")
(Avoid the use of special characters as *, / or others similar)
-e Path to the .AppImage, .bin or executable file gonna be used for execution
(If only name is provided, the current dir gonna be used as parent)
-i Path to the .ico, .png or other image file that gonna be used for icon
(If only name is provided, the current dir gonna be used as parent)
-t Declare if the terminal it ' s gonna be showed when executing the program
(Only " true " or " false " arguments are accepted)desktopfy -n " balena etcher " -e ~ /balena_etcher/etcher/balenaEtcher-1.7.8-x64.AppImage -i ~ /balena_etcher/etcher/etcher.ico -t invalidArgumentError: " invalidArgument " isn ' t a valid argument for -t
Usage: desktopfy [-n <programm_name>] [-e <executable_path>] [-i <icon_path>] [-t <true|false>]
-n Name of the program, for multiple words need to start and end with "" (ex. "some thing")
(Avoid the use of special characters as *, / or others similar)
-e Path to the .AppImage, .bin or executable file gonna be used for execution
(If only name is provided, the current dir gonna be used as parent)
-i Path to the .ico, .png or other image file that gonna be used for icon
(If only name is provided, the current dir gonna be used as parent)
-t Declare if the terminal it ' s gonna be showed when executing the program
(Only " true " or " false " arguments are accepted)