Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bash Scripts - DOS Style Line Endings #1691

Open
doorz1009 opened this issue Jan 18, 2024 · 1 comment
Open

Bash Scripts - DOS Style Line Endings #1691

doorz1009 opened this issue Jan 18, 2024 · 1 comment

Comments

@doorz1009
Copy link

(1) Issue/Bug Description:
Bash scripts in repository have DOS style line endings which causes bash interpreters to fail to run scripts.

(2) Steps to reproduce (if you know):

  1. Clone repository
  2. run make local-install
  3. : /bin/sh: 1: ./scripts/transpile.sh: not found indicating that sh couldn't be found, but really it's attempting to run /bin/sh^M (where ^M indicates the ASCII carriage return character)

(3) Expected behavior:
Scripts located in the ./scripts/ directory should execute in all linux shells (including bash)

(4) Distribution (run cat /etc/os-release):

cat /etc/os-release
show_command_in_title_bar
PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"
show_command_in_title_bar

(5) Gnome Shell version:
GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)

(6) Pop Shell version (run apt policy pop-shell or provide the latest commit if building locally):

commit 8e176f14029a2c3bb54c52e1e7a5c697b9eb2171

(7) Where was Pop Shell installed from:
github

(8) Monitor Setup (2 x 1080p, 4K, Primary(Horizontal), Secondary(Vertical), etc):
2x 4k, horizontal 60 fps

(9) Other Installed/Enabled Extensions:
None

(10) Other Notes:
Love the project <3

@doorz1009
Copy link
Author

Was able to fix by opening the file in vim and executing the following for each script:

:set ff=unix

and then saving the result. This translates the line endings into only being LF rather than CRLF.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant