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

script for linux installation #63

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Levi-Leah
Copy link
Collaborator

No description provided.

@Levi-Leah Levi-Leah self-assigned this Nov 8, 2021
@Levi-Leah Levi-Leah added the enhancement New feature or request label Nov 8, 2021
@Levi-Leah Levi-Leah linked an issue Nov 8, 2021 that may be closed by this pull request
@Levi-Leah Levi-Leah requested a review from adahms November 8, 2021 18:09
@Levi-Leah
Copy link
Collaborator Author

@adahms can you please take a look at the packaging/installation script and the respective section of the README file?

Copy link
Collaborator

@adahms adahms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @Levi-Leah - on the whole, this works for me.

One area where we might run into issues is with the value of the 'Release' attribute in the spec file. The script correctly identifies and passes the version to make.sh, but all that's doing today is helping the script identify the right sources, etc. to use.

How would you feel about taking a similar approach to the OSX script? I.e. doing away with RPMS all together and copying the source files into a directory under /usr/bin or somewhere similar?

That could help remove some steps for adding files to the spec file each time we make a change and simplify the overall process.

# clone repo

# install required packages
sudo dnf install subversion
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make this a one-liner, perhaps?

E.g. sudo dnf install subversion rpm-build

@Levi-Leah
Copy link
Collaborator Author

@adahms I reworked the linux installation script to be similar to the mac one. would you mind taking a look?

@@ -63,7 +63,7 @@ cp -r PantheonCMD /usr/local/bin

echo 'Adding an alias to ~/.zshrc file...'

alias pcmd="/usr/local/bin/python3 /usr/local/bin/PantheonCMD/pcmd.py $@"
alias pcmd="/usr/bin/python3 /usr/local/bin/PantheonCMD/pcmd.py $@"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in linux this command gives an exit code 0, which terminates the script. is it the same on mac? in which case I can change it to this:

Suggested change
alias pcmd="/usr/bin/python3 /usr/local/bin/PantheonCMD/pcmd.py $@"
set +e && alias pcmd="/usr/bin/python3 /usr/local/bin/PantheonCMD/pcmd.py $@"

Comment on lines +47 to +53
if [[ $SHELL = '/bin/bash' ]]; then
set +e && alias pcmd='/usr/bin/python3 /usr/local/bin/PantheonCMD/pcmd.py $@' && source ~/.bashrc
elif [[ $SHELL = '/bin/tcsh' ]]; then
set +e && alias pcmd '/usr/bin/python3 /usr/local/bin/PantheonCMD/pcmd.py $@' && source ~/.tcshrc
elif [[ $SHELL = '/bin/csh' ]]; then
set +e && alias pcmd '/usr/bin/python3 /usr/local/bin/PantheonCMD/pcmd.py $@' && source ~/.cshrc
fi
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if we should account for various shells or just roll with bash

sudo dnf install python3 ruby subversion rpm-build

echo 'Installing ruby gem dependencies...'
sudo gem install asciidoctor concurrent-ruby haml tilt
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

smth here isn't quite right, I get a deprecation message

DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621 Requirement already satisfie

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

Successfully merging this pull request may close these issues.

Create installation script for Linux systems
2 participants