-
Notifications
You must be signed in to change notification settings - Fork 0
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
24 changed files
with
34 additions
and
2,310 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
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
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 |
---|---|---|
|
@@ -5,5 +5,5 @@ branding: | |
icon: 'database' | ||
color: 'blue' | ||
runs: | ||
using: 'node16' | ||
using: 'node20' | ||
main: 'index.js' |
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,24 +1,20 @@ | ||
// Running a script that sets everything up | ||
|
||
const exec = require('@actions/exec'); | ||
const fs = require('fs'); | ||
var https = require('follow-redirects').https; | ||
const process = require('process'); | ||
const os = require('os'); | ||
const path = require('path'); | ||
|
||
tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), "ptr")); | ||
process.chdir(tmpDir); | ||
const file = fs.createWriteStream("pacman-tool-repo.tar.xz"); | ||
const request = https.get("https://github.com/termux-pacman/pacman-tool-repo/raw/main/pacman-tool-repo.tar.xz", function(response) { | ||
response.pipe(file); | ||
file.on("finish", async() => { | ||
file.close(); | ||
await exec.exec("tar xJf pacman-tool-repo.tar.xz"); | ||
fs.unlinkSync("pacman-tool-repo.tar.xz"); | ||
process.chdir("pacman-tool-repo/"); | ||
await exec.exec("sudo ./setup.sh"); | ||
process.chdir(__dirname); | ||
fs.rmSync(tmpDir, {recursive:true, force:true}); | ||
}); | ||
}); | ||
async function start() { | ||
await exec.exec("sudo su -c \"echo 'deb http://archive.ubuntu.com/ubuntu/ lunar main restricted' > /etc/apt/sources.list.d/lunar.list\""); | ||
await exec.exec("sudo su -c \"echo 'deb-src http://archive.ubuntu.com/ubuntu/ lunar main restricted' >> /etc/apt/sources.list.d/lunar.list\""); | ||
|
||
while (true) { | ||
try { | ||
await exec.exec("sudo apt update -y"); | ||
await exec.exec("sudo apt install pacman -y"); | ||
break; | ||
} catch (error) { | ||
continue; | ||
} | ||
} | ||
} | ||
|
||
start(); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.