Skip to content

Commit

Permalink
Support XDG in update script (#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gemba authored Jan 16, 2025
1 parent 91c231e commit 1fc9937
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,11 @@ When you've installed the prerequisites as described above for Linux or macOS, y
```
$ cd
$ mkdir -p skysource && cd skysource
$ wget -q -O - https://raw.githubusercontent.com/Gemba/skyscraper/master/update_skyscraper.sh | bash
$ wget -q -O - https://raw.githubusercontent.com/Gemba/skyscraper/master/update_skyscraper.sh | bash -s --
```
The last command will download and run the latest update script from Github. The script installs the latest release of Skyscraper, by default with the prefix `/usr/local/`. During the installation you might be asked for your sudo password. On RetroPie the default password is `raspberry`.

The last command will download and run the latest update script from Github. The script installs the latest release of Skyscraper. During the installation you might be asked for your sudo password. On RetroPie the default password is `raspberry`.
Default prefix for installation is `/usr/local/`. If you want to change this add `PREFIX=` after the pipe, thus it reads `PREFIX=/here/goes/skyscraper/ bash -s --`
If you want to compile Skyscraper with XDG support add `xdg` at the very end, thus it reads `bash -s -- xdg`
If you want also bash completion, then copy the [Skyscraper.bash](https://github.com/Gemba/skyscraper/blob/master/supplementary/bash-completion/Skyscraper.bash) to the folder of bash completion scripts according to your distribution.

When the script has completed you are ready to run Skyscraper!
Expand All @@ -117,7 +118,11 @@ $ cd
$ cd skysource
$ ./update_skyscraper.sh
```
You might be asked for your sudo password during the update. On RetroPie the default password is `raspberry`. If your version is older than 2.3.2 (check with `--help`) you need to follow the [installation instructions](#download-compile-and-install) instead.

Default prefix for installation is `/usr/local/`. If you want to change this add `PREFIX=` before the script e.g., `PREFIX=/here/goes/skyscraper ./update_skyscraper.sh`
If you want to compile Skyscraper with XDG support supply the positional argument `xdg` to the script e.g., `./update_skyscraper.sh xdg`
You might be asked for your sudo password during the update. On RetroPie the default password is `raspberry`.
If your version is older than 2.3.2 (check with `--help`) you need to follow the [installation instructions](#download-compile-and-install) instead.

### Installing the Development Version
If you want to build the latest `main/HEAD` version use the following commands. Make sure to have the before mentioned packages installed:
Expand Down
10 changes: 9 additions & 1 deletion update_skyscraper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,17 @@
printf '\n%s\n' "--- Unpacking ---"
tar_bin='tar'
[[ "$OSTYPE" == "darwin"* ]] && tar_bin='gtar'
$tar_bin xzf "$tarball" --strip-components 1 --overwrite || handle_error "unpack"
$tar_bin xzf "$tarball" --strip-components 1 --overwrite || handle_error "unpack"
rm -f "$tarball"

if [[ "$1" == "xdg" ]]; then
if [[ "$OSTYPE" == "darwin"* ]]; then
sed -i '' "s|#DEFINES+=XDG|DEFINES+=XDG|" skyscraper.pro
else
sed -i "s|#DEFINES+=XDG|DEFINES+=XDG|" skyscraper.pro
fi
fi

printf '\n%s\n' "--- Cleaning out old build if one exists ---"
make --ignore-errors clean
rm -f .qmake.stash
Expand Down

0 comments on commit 1fc9937

Please sign in to comment.