-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
22 additions
and
18 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,35 @@ | ||
#!/usr/bin/bash | ||
|
||
# This script fixes permissions for .pacman, this should be | ||
# done elsewhere, either in electron builder or forge maker, | ||
# done elsewhere, either in electron builder or forge maker, | ||
# although this script is ugly, it's a fast fix. | ||
|
||
if [ $# -ne 1 ]; | ||
then echo "Please supply Deezer version" | ||
set -o errexit | ||
set -o nounset | ||
|
||
if [[ $# -ne 1 ]]; then | ||
echo "Please supply Deezer version" | ||
exit 1 | ||
fi | ||
|
||
VERSION=$1 | ||
|
||
cd "./out/make" | ||
|
||
mkdir "deezer-enhanced-${VERSION}" | ||
|
||
# Unpack tar.xf to folder | ||
tar -xf "deezer-enhanced-${VERSION}.pacman" --directory "deezer-enhanced-${VERSION}" | ||
( | ||
cd "./out/make" || exit 1 | ||
mkdir "deezer-enhanced-${VERSION}" | ||
|
||
# Remove old package | ||
rm "deezer-enhanced-${VERSION}.pacman" | ||
# Unpack tar.xf to folder | ||
tar --extract --file "deezer-enhanced-${VERSION}.pacman" --directory "deezer-enhanced-${VERSION}" | ||
|
||
# Apply fix | ||
chmod 755 "deezer-enhanced-${VERSION}/opt/deezer-enhanced" | ||
# Remove old package | ||
rm "deezer-enhanced-${VERSION}.pacman" | ||
|
||
# Package as a new package | ||
cd "deezer-enhanced-${VERSION}" | ||
tar -Jcvf "../deezer-enhanced-${VERSION}.pacman" "usr" "opt" ".PKGINFO" ".MTREE" ".INSTALL" | ||
cd ".." | ||
# Apply fix | ||
chmod 755 "deezer-enhanced-${VERSION}/opt/deezer-enhanced" | ||
|
||
cd "../.." | ||
# Package as a new package | ||
( | ||
cd "deezer-enhanced-${VERSION}" || exit 1 | ||
tar --xz --create --file "../deezer-enhanced-${VERSION}.pacman" "usr" "opt" ".PKGINFO" ".MTREE" ".INSTALL" | ||
) | ||
) |