Skip to content

Instantly share code, notes, and snippets.

@Programazing
Last active August 3, 2024 16:57
Show Gist options
  • Save Programazing/e443430b571a6f9b2f46fe6120e59f5f to your computer and use it in GitHub Desktop.
Save Programazing/e443430b571a6f9b2f46fe6120e59f5f to your computer and use it in GitHub Desktop.
Flatpak Install Script
alias generateFlatpakScript="~/generate_flatpak_install_script.sh"
#!/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"
source ~/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment