Last active
August 3, 2024 16:57
-
-
Save Programazing/e443430b571a6f9b2f46fe6120e59f5f to your computer and use it in GitHub Desktop.
Flatpak Install Script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias generateFlatpakScript="~/generate_flatpak_install_script.sh" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Define the output script file | |
output_file=~/flatpak_install_script.sh | |
# Write the header of the script file | |
echo "#!/bin/bash" > $output_file | |
echo "flatpak install flathub \\" >> $output_file | |
# List the Flatpak applications and append them to the script file in the desired format | |
flatpak list --app --columns=application | sed 's/$/ \\/' >> $output_file | |
# Remove the trailing backslash from the last line | |
sed -i '$ s/ \\$//' $output_file | |
# Make the script executable | |
chmod +x $output_file | |
echo "Installation script created at $output_file" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source ~/.bashrc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment