Refactoring repository...
Some checks are pending
Check Conventional Commit / check-commit-message (push) Waiting to run

This commit is contained in:
CELESTIFYX
2025-01-14 19:02:06 +02:00
parent 876fa0988e
commit 08abac9e7d
33171 changed files with 4677 additions and 761 deletions

View File

@@ -0,0 +1,30 @@
# Maintainer: CELESTIFYX Team <celestifyx@gmail.com>
pkgname="fonts-tlwg"
pkgver=0.7.3
pkgrel=1
pkgdesc="Collection of scalable Thai fonts"
arch=("any")
license=("GPL-3.0-or-later")
makedepends=("fontforge")
source=("https://github.com/tlwg/fonts-tlwg/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.xz")
sha1sums=("8c2b7878d9272573125b49ba2f3929154d291cb4")
conflicts=("ttf-tlwg")
provides=("ttf-tlwg")
replaces=("ttf-tlwg")
package() {
cd "${pkgname}-${pkgver}"
./configure --prefix=/usr --sysconfdir=/etc --enable-ttf --disable-otf --with-ttfdir=/usr/share/fonts/TTF
make
make DESTDIR="${pkgdir}" install
mkdir -p "${pkgdir}/etc/fonts"
mv "${pkgdir}/usr/share/fontconfig/conf.avail" "${pkgdir}/etc/fonts"
rm -r "${pkgdir}/usr/share/fontconfig"
}

View File

@@ -0,0 +1,44 @@
.PHONY: all
all: build git install
.PHONY: clean
clean:
rm -r src pkg || true
.PHONY: geninteg
geninteg:
sed -i '/.*sums=(/,$$d' PKGBUILD
makepkg --geninteg >> PKGBUILD
.PHONY: srcinfo
srcinfo:
makepkg --printsrcinfo > .SRCINFO
.PHONY: makepkg
makepkg:
makepkg -s
.PHONY: build
build: geninteg srcinfo makepkg
.PHONY: git
git: git_add git_commit
.PHONY: git_add
git_add:
git add PKGBUILD .SRCINFO Makefile
.PHONY: git_commit
git_commit: VERSION = "$(shell grep pkgver .SRCINFO | cut -d '=' -f 2 | xargs)"
git_commit: GIT_STATUS = "$(shell git status --porcelain)"
git_commit:
[ -n ${GIT_STATUS} ] && git commit -m "Update to ${VERSION}"
.PHONY: install
install:
makepkg --repackage --install --force
.PHONY: open
open: URL = "$(shell grep url .SRCINFO | cut -d '=' -f 2 | xargs)"
open:
xdg-open $(URL)

View File

@@ -0,0 +1,67 @@
# Maintainer: CELESTIFYX Team <celestifyx@gmail.com>
pkgname="lohit-fonts"
pkgver=1.0.0
pkgrel=1
pkgdesc="Indic TrueType fonts from Fedora Project"
arch=("any")
license=("GPL-3.0-or-later")
depends=("fontconfig")
url="https://releases.pagure.org/lohit/"
source=("${url}/lohit-assamese-ttf-2.91.5.tar.gz"
"${url}/lohit-bengali-ttf-2.91.5.tar.gz"
"${url}/lohit-devanagari-ttf-2.95.4.tar.gz"
"${url}/lohit-gujarati-ttf-2.92.4.tar.gz"
"${url}/lohit-gurmukhi-ttf-2.91.2.tar.gz"
"${url}/lohit-hindi-ttf-2.4.3.tar.gz"
"${url}/lohit-kannada-ttf-2.5.4.tar.gz"
"${url}/lohit-kashmiri-ttf-2.4.3.tar.gz"
"${url}/lohit-konkani-ttf-2.4.3.tar.gz"
"${url}/lohit-maithili-ttf-2.4.3.tar.gz"
"${url}/lohit-malayalam-ttf-2.92.2.tar.gz"
"${url}/lohit-marathi-ttf-2.94.2.tar.gz"
"${url}/lohit-nepali-ttf-2.94.2.tar.gz"
"${url}/lohit-oriya-ttf-2.5.4.1.tar.gz"
"${url}/lohit-odia-ttf-2.91.2.tar.gz"
"${url}/lohit-punjabi-ttf-2.5.3.tar.gz"
"${url}/lohit-sindhi-ttf-2.4.3.tar.gz"
"${url}/lohit-tamil-ttf-2.91.3.tar.gz"
"${url}/lohit-tamil-classical-ttf-2.5.4.tar.gz"
"${url}/lohit-telugu-ttf-2.5.5.tar.gz")
sha512sums=("beee1d5bff35bf53dd8386c373e8655572a393eee5e0c7e413764caff63536fbedc02880413e83880155af629a7c2240cdbd6c13e608c90ba1bf6e6d91be4e81"
"f3c2b2856604e82e2d745ec0a9262f7385039543639526634586189d6cd0240473c3195276923151ecb4e793bc56d3bc1824bf7c60fc533fd8c2ade2bfe85430"
"b637c11e0c7c48d9cf67c265ee0df79029c20cd523748ee00b406b62c11f80842a1d58eb2e5a5f03c2457de08a6e73d4eb4997e3b524994eb32e76b63ed69b73"
"e84af3d32d2947886e8d2bf3757ee2bda1003bca683a965cb9e484b549f656061d6fd01110600f468d4f4f00ed895caf3a85806ef93b2caa26b5cd4c1433c8d6"
"714ed72d201e7f8956d24e9d9f1526207beb91a604e88c02a8b0d145f19d9bfe1408ca290d1665ebef462ab3854365dcd9850529803277738e2585addf3e280a"
"6742011370f42929ca65e7a9a39f4b07c33b09339110a1b1e1784d0d57b4f6d56af1bebc34d548ad3076c8880adb25994367677c48ce3bc86fec74cdc8861663"
"a9468454ecb90bfbd43b326aca0a675762dd6cecaf5d9b130812d8ca3b19cbd3552df9ac92cb035585112387fb2e422e6e6a87510d0436d73537a8ccc4c5fc99"
"833496d5810caff036943ccd32b6b7ceb116b6631da1ff5e6e3293bcce50fd105608770f82eaca25b822eb1001edd24bbb1a9f9480be501f579d7563ec81618f"
"f3a1bbbf78d3e7841151bfe52be652833672b99602f9c93e109b2cbac9ad6f2cc983813b12e01c8d21bf780a07268a6a6e0e4c714eb12f86f83503bab3150ebc"
"9b69e29feed8d0b06ecaea35c944f0c3cd4502e47896966c8d6a3599b87f9cec1173f48104084df7f573319f00a73ff4d78a7f3019806740625712fc2b2a1df6"
"82a5ca34da6a91c4a6b32a0b170d88c2b5a0e92896c5acbd3acf9526d76a16bc4b6078f0fcb5f96793b4552ad990a8b7ba6224c28d963f7765da2654652ebab8"
"2fa8d431db5fb93a17df16c02b89039cb56f78208a1a077f6d42631dd69b2f58ea19aceb88fe32753e38f53fc1a277c48d0aab1191875acba2bb1cce200f2a04"
"9ad9b5c393a1e622738d2a17dd3821b2c18840bfe2da023bfc818b5244a79037bde00b0659c9601b2fc6eedc33d765d55d7831f535cdc03bbcb4f54cc9ab38a4"
"d49cfffd3df997e63c535f4240f8d20f269d993d17eabb1afa5f68a3c3a23fea903f4c4900551e5a90857656aa69c15271283be19fb4f83536d2e4b6a05b1b6a"
"170350be1005e0eacf51a3c89fcdc897e6e36fe543dd5ca8d876c22c14df8b3fd8c58608969a0b3cd4b1c74445082f2ab5476ea72888fed5871d3987430ff2a8"
"589255cc24ba2feef307758bac17e78c42205e2a0302639aefe7c20a00acc539c3e02b802bc91a76a57326653d3f8f372e129a31ba8ca65e3a2a5f4d1d7f3d92"
"5145e5e36e5349e6d6099b5af73034f8cb4a2dbffa490e4297991f7d8181dbc1d425ab0f5759a1b47b0479bf684cef602760371d2807049dc0f9fa4344d0efcd"
"935ca653e033820e9189544444fc36663ef712226bf96d69a05f13161c5ad874ee6baa12d06695110c113d7185f60a8af287989e4630f9f6b4e66ab079b6f8ef"
"f934d5e9d2aa5a76e9a709c0df5d33eb378095d8d3d45bd53d5cdd5345348722467aed22e8e0c0f0be5c72cf1bec2e70533df8932ac903f20da7aa770e7a3b62"
"9a02da13a5ef511f11623d245cede6a0414d8d62f0038fef4b4fc395a2ae2dfc927e28f3a445c61b416bc03cda21d53699a93657dd14b21fe4a7ada0250693e0")
package() {
install -d "${pkgdir}/usr/share/fonts/TTF"
install -d "${pkgdir}/etc/fonts/conf.avail"
install -d "${pkgdir}/etc/fonts/conf.d"
install -m644 "${srcdir}"/*/*.conf "${pkgdir}/etc/fonts/conf.avail/"
install -m644 "${srcdir}"/*/*.ttf "${pkgdir}/usr/share/fonts/TTF/"
cd "${pkgdir}/etc/fonts/conf.d"
for config in ../conf.avail/*.conf; do
ln -s "${config}" .
done
}

View File

@@ -0,0 +1,18 @@
# Maintainer: CELESTIFYX Team <celestifyx@gmail.com>
pkgname="lynxfetch"
pkgver=1.0.2
pkgrel=1
pkgdesc="Super fast, versatile, and customizable command-line fetcher."
arch=("any")
makedepends=("cargo")
source=("https://gitlab.com/${pkgname}/${pkgname}/-/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz")
sha512sums=("c352adf09c7d7507a03b72143dfde428045dfa2fc075bdb9e09c393effd8d4b772465bd27f5e75f8c5181308a90ba2366b32d6e27c395bdc36237050cd34d9e5")
package() {
cd "${pkgname}-${pkgver}"
cargo build -r -F linux
install -Dm755 "target/release/${pkgname}" -t "${pkgdir}/usr/bin/"
}

View File

@@ -0,0 +1,30 @@
# Maintainer: CELESTIFYX Team <celestifyx@gmail.com>
pkgname="powershell"
pkgver=7.4.6
pkgrel=1
pkgdesc="A cross-platform automation and configuration tool/framework (binary package)"
arch=("x86_64")
license=("GPL-3.0-or-later")
depends=("gcc-libs"
"glibc"
"zlib")
optdepends=("lttng-ust2.12: CoreCLR tracing")
conflicts=("${pkgname}-bin")
install="${pkgname}.install"
source=("https://github.com/Powershell/Powershell/releases/download/v${pkgver}/powershell-${pkgver}-linux-x64.tar.gz")
sha512sums=("0a449f458bafeeacb3c410d83ce2f89f117f001a4b4a18b57dd3282ac358f382a13019657343f66a5cbd9c23b93df346823ac5337393d1addc948d550d3bf89d")
package() {
local pkgnum="${pkgver:0:1}"
install -dm755 "${pkgdir}/usr/lib/${pkgname}-${pkgnum}"
cp -a ./* -t "${pkgdir}/usr/lib/${pkgname}-${pkgnum}"
chmod 755 "${pkgdir}/usr/lib/${pkgname}-${pkgnum}/pwsh"
install -dm755 "${pkgdir}/usr/bin"
ln -s "/usr/lib/${pkgname}-${pkgnum}/pwsh" "${pkgdir}/usr/bin/pwsh"
}

View File

@@ -0,0 +1,11 @@
post_install() {
grep -qe '^/usr/bin/pwsh$' etc/shells || echo '/usr/bin/pwsh' >> etc/shells
}
post_upgrade() {
post_install
}
pre_remove() {
sed -ri '\|^/usr/bin/pwsh$|d' etc/shells
}

View File

@@ -0,0 +1,33 @@
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<match target="pattern">
<test name="lang" compare="contains">
<string>bn</string>
</test>
<test qual="any" name="family">
<string>sans-serif</string>
</test>
<edit name="family" binding="strong" mode="prepend">
<string>Noto Serif Bengali</string>
</edit>
</match>
<match target="pattern">
<test name="lang" compare="contains">
<string>bn</string>
</test>
<test qual="any" name="family">
<string>serif</string>
</test>
<edit name="family" binding="strong" mode="prepend">
<string>Noto Serif Bengali</string>
</edit>
</match>
<dir>~/.fonts</dir>
</fontconfig>

View File

@@ -0,0 +1,28 @@
# Contributor: Eshan Roy <eshan@snigdhaos.org>
# Maintainer: CELESTIFYX Team <celestifyx@celestifyx.com>
pkgname="snigdhaos-asian-fonts"
pkgver=1.0.0
pkgrel=1
arch=("any")
license=("GPL-3.0-or-later")
pkgdesc="Meta-package containing common asian fonts"
install="${pkgname}.install"
depends=("fonts-tlwg"
"lohit-fonts"
"opendesktop-fonts"
"otf-ipafont"
"ttf-baekmuk"
"ttf-hannom"
"ttf-indic-otf"
"ttf-khmer"
"ttf-tibetan-machine")
source=("90-bengali.conf")
sha512sums=("df5c93a4fc2da919b749f839c4ae7c4fbfec8b0c4a5904753b17d8d5811b03a036cbaeda453684e196ec7429ea5f2b15805749df92c8e9c71243bce0843c0cfe")
package() {
mkdir -p "$pkgdir"/etc/fonts/conf.d
install -D -m644 90-bengali.conf "$pkgdir"/etc/fonts/conf.d/90-bengali.conf
}

View File

@@ -0,0 +1,7 @@
post_install() {
echo -e "\n** The files have been installed in /etc/fonts/conf.d **\n"
}
post_upgrade() {
post_install
}

View File

@@ -0,0 +1,21 @@
# Maintainer: Eshan Roy <eshan@snigdhaos.org>
# Maintainer: CELESTIFYX Team <celestifyx@gmail.com>
pkgname="snigdhaos-grub-theme"
branch=master
pkgver=1.0.0
pkgrel=1
pkgdesc="Grub Theme For Snigdha OS"
arch=("any")
license=("GPL-3.0-or-later")
makedepends=("git")
depends=("grub")
install="${pkgname}.install"
source=("grub-theme::git+https://github.com/snigdha-os/${pkgname}.git")
sha512sums=("SKIP")
package() {
cd "grub-theme/snigdhaos-live" || exit
find . -type f -exec install -D -m644 {} "${pkgdir}"/usr/share/grub/themes/snigdhaos-grub-theme/{} \;
}

View File

@@ -0,0 +1 @@
3e36d6c1c50e2a922fcb90987715f964fd1919b6 not-for-merge branch 'master' of https://github.com/snigdha-os/snigdhaos-grub-theme

View File

@@ -0,0 +1 @@
ref: refs/heads/master

View File

@@ -0,0 +1,8 @@
[core]
repositoryformatversion = 0
filemode = true
bare = true
[remote "origin"]
url = https://github.com/snigdha-os/snigdhaos-grub-theme.git
fetch = +refs/*:refs/*
mirror = true

View File

@@ -0,0 +1 @@
Unnamed repository; edit this file 'description' to name the repository.

View File

@@ -0,0 +1,15 @@
#!/bin/sh
#
# An example hook script to check the commit log message taken by
# applypatch from an e-mail message.
#
# The hook should exit with non-zero status after issuing an
# appropriate message if it wants to stop the commit. The hook is
# allowed to edit the commit message file.
#
# To enable this hook, rename this file to "applypatch-msg".
. git-sh-setup
commitmsg="$(git rev-parse --git-path hooks/commit-msg)"
test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"}
:

View File

@@ -0,0 +1,24 @@
#!/bin/sh
#
# An example hook script to check the commit log message.
# Called by "git commit" with one argument, the name of the file
# that has the commit message. The hook should exit with non-zero
# status after issuing an appropriate message if it wants to stop the
# commit. The hook is allowed to edit the commit message file.
#
# To enable this hook, rename this file to "commit-msg".
# Uncomment the below to add a Signed-off-by line to the message.
# Doing this in a hook is a bad idea in general, but the prepare-commit-msg
# hook is more suited to it.
#
# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
# This example catches duplicate Signed-off-by lines.
test "" = "$(grep '^Signed-off-by: ' "$1" |
sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || {
echo >&2 Duplicate Signed-off-by lines.
exit 1
}

View File

@@ -0,0 +1,174 @@
#!/usr/bin/perl
use strict;
use warnings;
use IPC::Open2;
# An example hook script to integrate Watchman
# (https://facebook.github.io/watchman/) with git to speed up detecting
# new and modified files.
#
# The hook is passed a version (currently 2) and last update token
# formatted as a string and outputs to stdout a new update token and
# all files that have been modified since the update token. Paths must
# be relative to the root of the working tree and separated by a single NUL.
#
# To enable this hook, rename this file to "query-watchman" and set
# 'git config core.fsmonitor .git/hooks/query-watchman'
#
my ($version, $last_update_token) = @ARGV;
# Uncomment for debugging
# print STDERR "$0 $version $last_update_token\n";
# Check the hook interface version
if ($version ne 2) {
die "Unsupported query-fsmonitor hook version '$version'.\n" .
"Falling back to scanning...\n";
}
my $git_work_tree = get_working_dir();
my $retry = 1;
my $json_pkg;
eval {
require JSON::XS;
$json_pkg = "JSON::XS";
1;
} or do {
require JSON::PP;
$json_pkg = "JSON::PP";
};
launch_watchman();
sub launch_watchman {
my $o = watchman_query();
if (is_work_tree_watched($o)) {
output_result($o->{clock}, @{$o->{files}});
}
}
sub output_result {
my ($clockid, @files) = @_;
# Uncomment for debugging watchman output
# open (my $fh, ">", ".git/watchman-output.out");
# binmode $fh, ":utf8";
# print $fh "$clockid\n@files\n";
# close $fh;
binmode STDOUT, ":utf8";
print $clockid;
print "\0";
local $, = "\0";
print @files;
}
sub watchman_clock {
my $response = qx/watchman clock "$git_work_tree"/;
die "Failed to get clock id on '$git_work_tree'.\n" .
"Falling back to scanning...\n" if $? != 0;
return $json_pkg->new->utf8->decode($response);
}
sub watchman_query {
my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty')
or die "open2() failed: $!\n" .
"Falling back to scanning...\n";
# In the query expression below we're asking for names of files that
# changed since $last_update_token but not from the .git folder.
#
# To accomplish this, we're using the "since" generator to use the
# recency index to select candidate nodes and "fields" to limit the
# output to file names only. Then we're using the "expression" term to
# further constrain the results.
my $last_update_line = "";
if (substr($last_update_token, 0, 1) eq "c") {
$last_update_token = "\"$last_update_token\"";
$last_update_line = qq[\n"since": $last_update_token,];
}
my $query = <<" END";
["query", "$git_work_tree", {$last_update_line
"fields": ["name"],
"expression": ["not", ["dirname", ".git"]]
}]
END
# Uncomment for debugging the watchman query
# open (my $fh, ">", ".git/watchman-query.json");
# print $fh $query;
# close $fh;
print CHLD_IN $query;
close CHLD_IN;
my $response = do {local $/; <CHLD_OUT>};
# Uncomment for debugging the watch response
# open ($fh, ">", ".git/watchman-response.json");
# print $fh $response;
# close $fh;
die "Watchman: command returned no output.\n" .
"Falling back to scanning...\n" if $response eq "";
die "Watchman: command returned invalid output: $response\n" .
"Falling back to scanning...\n" unless $response =~ /^\{/;
return $json_pkg->new->utf8->decode($response);
}
sub is_work_tree_watched {
my ($output) = @_;
my $error = $output->{error};
if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) {
$retry--;
my $response = qx/watchman watch "$git_work_tree"/;
die "Failed to make watchman watch '$git_work_tree'.\n" .
"Falling back to scanning...\n" if $? != 0;
$output = $json_pkg->new->utf8->decode($response);
$error = $output->{error};
die "Watchman: $error.\n" .
"Falling back to scanning...\n" if $error;
# Uncomment for debugging watchman output
# open (my $fh, ">", ".git/watchman-output.out");
# close $fh;
# Watchman will always return all files on the first query so
# return the fast "everything is dirty" flag to git and do the
# Watchman query just to get it over with now so we won't pay
# the cost in git to look up each individual file.
my $o = watchman_clock();
$error = $output->{error};
die "Watchman: $error.\n" .
"Falling back to scanning...\n" if $error;
output_result($o->{clock}, ("/"));
$last_update_token = $o->{clock};
eval { launch_watchman() };
return 0;
}
die "Watchman: $error.\n" .
"Falling back to scanning...\n" if $error;
return 1;
}
sub get_working_dir {
my $working_dir;
if ($^O =~ 'msys' || $^O =~ 'cygwin') {
$working_dir = Win32::GetCwd();
$working_dir =~ tr/\\/\//;
} else {
require Cwd;
$working_dir = Cwd::cwd();
}
return $working_dir;
}

View File

@@ -0,0 +1,8 @@
#!/bin/sh
#
# An example hook script to prepare a packed repository for use over
# dumb transports.
#
# To enable this hook, rename this file to "post-update".
exec git update-server-info

View File

@@ -0,0 +1,14 @@
#!/bin/sh
#
# An example hook script to verify what is about to be committed
# by applypatch from an e-mail message.
#
# The hook should exit with non-zero status after issuing an
# appropriate message if it wants to stop the commit.
#
# To enable this hook, rename this file to "pre-applypatch".
. git-sh-setup
precommit="$(git rev-parse --git-path hooks/pre-commit)"
test -x "$precommit" && exec "$precommit" ${1+"$@"}
:

View File

@@ -0,0 +1,49 @@
#!/bin/sh
#
# An example hook script to verify what is about to be committed.
# Called by "git commit" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
#
# To enable this hook, rename this file to "pre-commit".
if git rev-parse --verify HEAD >/dev/null 2>&1
then
against=HEAD
else
# Initial commit: diff against an empty tree object
against=$(git hash-object -t tree /dev/null)
fi
# If you want to allow non-ASCII filenames set this variable to true.
allownonascii=$(git config --type=bool hooks.allownonascii)
# Redirect output to stderr.
exec 1>&2
# Cross platform projects tend to avoid non-ASCII filenames; prevent
# them from being added to the repository. We exploit the fact that the
# printable range starts at the space character and ends with tilde.
if [ "$allownonascii" != "true" ] &&
# Note that the use of brackets around a tr range is ok here, (it's
# even required, for portability to Solaris 10's /usr/bin/tr), since
# the square bracket bytes happen to fall in the designated range.
test $(git diff-index --cached --name-only --diff-filter=A -z $against |
LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0
then
cat <<\EOF
Error: Attempt to add a non-ASCII file name.
This can cause problems if you want to work with people on other platforms.
To be portable it is advisable to rename the file.
If you know what you are doing you can disable this check using:
git config hooks.allownonascii true
EOF
exit 1
fi
# If there are whitespace errors, print the offending file names and fail.
exec git diff-index --check --cached $against --

View File

@@ -0,0 +1,13 @@
#!/bin/sh
#
# An example hook script to verify what is about to be committed.
# Called by "git merge" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message to
# stderr if it wants to stop the merge commit.
#
# To enable this hook, rename this file to "pre-merge-commit".
. git-sh-setup
test -x "$GIT_DIR/hooks/pre-commit" &&
exec "$GIT_DIR/hooks/pre-commit"
:

View File

@@ -0,0 +1,53 @@
#!/bin/sh
# An example hook script to verify what is about to be pushed. Called by "git
# push" after it has checked the remote status, but before anything has been
# pushed. If this script exits with a non-zero status nothing will be pushed.
#
# This hook is called with the following parameters:
#
# $1 -- Name of the remote to which the push is being done
# $2 -- URL to which the push is being done
#
# If pushing without using a named remote those arguments will be equal.
#
# Information about the commits which are being pushed is supplied as lines to
# the standard input in the form:
#
# <local ref> <local oid> <remote ref> <remote oid>
#
# This sample shows how to prevent push of commits where the log message starts
# with "WIP" (work in progress).
remote="$1"
url="$2"
zero=$(git hash-object --stdin </dev/null | tr '[0-9a-f]' '0')
while read local_ref local_oid remote_ref remote_oid
do
if test "$local_oid" = "$zero"
then
# Handle delete
:
else
if test "$remote_oid" = "$zero"
then
# New branch, examine all commits
range="$local_oid"
else
# Update to existing branch, examine new commits
range="$remote_oid..$local_oid"
fi
# Check for WIP commit
commit=$(git rev-list -n 1 --grep '^WIP' "$range")
if test -n "$commit"
then
echo >&2 "Found WIP commit in $local_ref, not pushing"
exit 1
fi
fi
done
exit 0

View File

@@ -0,0 +1,169 @@
#!/bin/sh
#
# Copyright (c) 2006, 2008 Junio C Hamano
#
# The "pre-rebase" hook is run just before "git rebase" starts doing
# its job, and can prevent the command from running by exiting with
# non-zero status.
#
# The hook is called with the following parameters:
#
# $1 -- the upstream the series was forked from.
# $2 -- the branch being rebased (or empty when rebasing the current branch).
#
# This sample shows how to prevent topic branches that are already
# merged to 'next' branch from getting rebased, because allowing it
# would result in rebasing already published history.
publish=next
basebranch="$1"
if test "$#" = 2
then
topic="refs/heads/$2"
else
topic=`git symbolic-ref HEAD` ||
exit 0 ;# we do not interrupt rebasing detached HEAD
fi
case "$topic" in
refs/heads/??/*)
;;
*)
exit 0 ;# we do not interrupt others.
;;
esac
# Now we are dealing with a topic branch being rebased
# on top of master. Is it OK to rebase it?
# Does the topic really exist?
git show-ref -q "$topic" || {
echo >&2 "No such branch $topic"
exit 1
}
# Is topic fully merged to master?
not_in_master=`git rev-list --pretty=oneline ^master "$topic"`
if test -z "$not_in_master"
then
echo >&2 "$topic is fully merged to master; better remove it."
exit 1 ;# we could allow it, but there is no point.
fi
# Is topic ever merged to next? If so you should not be rebasing it.
only_next_1=`git rev-list ^master "^$topic" ${publish} | sort`
only_next_2=`git rev-list ^master ${publish} | sort`
if test "$only_next_1" = "$only_next_2"
then
not_in_topic=`git rev-list "^$topic" master`
if test -z "$not_in_topic"
then
echo >&2 "$topic is already up to date with master"
exit 1 ;# we could allow it, but there is no point.
else
exit 0
fi
else
not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"`
/usr/bin/perl -e '
my $topic = $ARGV[0];
my $msg = "* $topic has commits already merged to public branch:\n";
my (%not_in_next) = map {
/^([0-9a-f]+) /;
($1 => 1);
} split(/\n/, $ARGV[1]);
for my $elem (map {
/^([0-9a-f]+) (.*)$/;
[$1 => $2];
} split(/\n/, $ARGV[2])) {
if (!exists $not_in_next{$elem->[0]}) {
if ($msg) {
print STDERR $msg;
undef $msg;
}
print STDERR " $elem->[1]\n";
}
}
' "$topic" "$not_in_next" "$not_in_master"
exit 1
fi
<<\DOC_END
This sample hook safeguards topic branches that have been
published from being rewound.
The workflow assumed here is:
* Once a topic branch forks from "master", "master" is never
merged into it again (either directly or indirectly).
* Once a topic branch is fully cooked and merged into "master",
it is deleted. If you need to build on top of it to correct
earlier mistakes, a new topic branch is created by forking at
the tip of the "master". This is not strictly necessary, but
it makes it easier to keep your history simple.
* Whenever you need to test or publish your changes to topic
branches, merge them into "next" branch.
The script, being an example, hardcodes the publish branch name
to be "next", but it is trivial to make it configurable via
$GIT_DIR/config mechanism.
With this workflow, you would want to know:
(1) ... if a topic branch has ever been merged to "next". Young
topic branches can have stupid mistakes you would rather
clean up before publishing, and things that have not been
merged into other branches can be easily rebased without
affecting other people. But once it is published, you would
not want to rewind it.
(2) ... if a topic branch has been fully merged to "master".
Then you can delete it. More importantly, you should not
build on top of it -- other people may already want to
change things related to the topic as patches against your
"master", so if you need further changes, it is better to
fork the topic (perhaps with the same name) afresh from the
tip of "master".
Let's look at this example:
o---o---o---o---o---o---o---o---o---o "next"
/ / / /
/ a---a---b A / /
/ / / /
/ / c---c---c---c B /
/ / / \ /
/ / / b---b C \ /
/ / / / \ /
---o---o---o---o---o---o---o---o---o---o---o "master"
A, B and C are topic branches.
* A has one fix since it was merged up to "next".
* B has finished. It has been fully merged up to "master" and "next",
and is ready to be deleted.
* C has not merged to "next" at all.
We would want to allow C to be rebased, refuse A, and encourage
B to be deleted.
To compute (1):
git rev-list ^master ^topic next
git rev-list ^master next
if these match, topic has not merged in next at all.
To compute (2):
git rev-list master..topic
if this is empty, it is fully merged to "master".
DOC_END

View File

@@ -0,0 +1,24 @@
#!/bin/sh
#
# An example hook script to make use of push options.
# The example simply echoes all push options that start with 'echoback='
# and rejects all pushes when the "reject" push option is used.
#
# To enable this hook, rename this file to "pre-receive".
if test -n "$GIT_PUSH_OPTION_COUNT"
then
i=0
while test "$i" -lt "$GIT_PUSH_OPTION_COUNT"
do
eval "value=\$GIT_PUSH_OPTION_$i"
case "$value" in
echoback=*)
echo "echo from the pre-receive-hook: ${value#*=}" >&2
;;
reject)
exit 1
esac
i=$((i + 1))
done
fi

View File

@@ -0,0 +1,42 @@
#!/bin/sh
#
# An example hook script to prepare the commit log message.
# Called by "git commit" with the name of the file that has the
# commit message, followed by the description of the commit
# message's source. The hook's purpose is to edit the commit
# message file. If the hook fails with a non-zero status,
# the commit is aborted.
#
# To enable this hook, rename this file to "prepare-commit-msg".
# This hook includes three examples. The first one removes the
# "# Please enter the commit message..." help message.
#
# The second includes the output of "git diff --name-status -r"
# into the message, just before the "git status" output. It is
# commented because it doesn't cope with --amend or with squashed
# commits.
#
# The third example adds a Signed-off-by line to the message, that can
# still be edited. This is rarely a good idea.
COMMIT_MSG_FILE=$1
COMMIT_SOURCE=$2
SHA1=$3
/usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE"
# case "$COMMIT_SOURCE,$SHA1" in
# ,|template,)
# /usr/bin/perl -i.bak -pe '
# print "\n" . `git diff --cached --name-status -r`
# if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;;
# *) ;;
# esac
# SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
# git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE"
# if test -z "$COMMIT_SOURCE"
# then
# /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE"
# fi

View File

@@ -0,0 +1,78 @@
#!/bin/sh
# An example hook script to update a checked-out tree on a git push.
#
# This hook is invoked by git-receive-pack(1) when it reacts to git
# push and updates reference(s) in its repository, and when the push
# tries to update the branch that is currently checked out and the
# receive.denyCurrentBranch configuration variable is set to
# updateInstead.
#
# By default, such a push is refused if the working tree and the index
# of the remote repository has any difference from the currently
# checked out commit; when both the working tree and the index match
# the current commit, they are updated to match the newly pushed tip
# of the branch. This hook is to be used to override the default
# behaviour; however the code below reimplements the default behaviour
# as a starting point for convenient modification.
#
# The hook receives the commit with which the tip of the current
# branch is going to be updated:
commit=$1
# It can exit with a non-zero status to refuse the push (when it does
# so, it must not modify the index or the working tree).
die () {
echo >&2 "$*"
exit 1
}
# Or it can make any necessary changes to the working tree and to the
# index to bring them to the desired state when the tip of the current
# branch is updated to the new commit, and exit with a zero status.
#
# For example, the hook can simply run git read-tree -u -m HEAD "$1"
# in order to emulate git fetch that is run in the reverse direction
# with git push, as the two-tree form of git read-tree -u -m is
# essentially the same as git switch or git checkout that switches
# branches while keeping the local changes in the working tree that do
# not interfere with the difference between the branches.
# The below is a more-or-less exact translation to shell of the C code
# for the default behaviour for git's push-to-checkout hook defined in
# the push_to_deploy() function in builtin/receive-pack.c.
#
# Note that the hook will be executed from the repository directory,
# not from the working tree, so if you want to perform operations on
# the working tree, you will have to adapt your code accordingly, e.g.
# by adding "cd .." or using relative paths.
if ! git update-index -q --ignore-submodules --refresh
then
die "Up-to-date check failed"
fi
if ! git diff-files --quiet --ignore-submodules --
then
die "Working directory has unstaged changes"
fi
# This is a rough translation of:
#
# head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX
if git cat-file -e HEAD 2>/dev/null
then
head=HEAD
else
head=$(git hash-object -t tree --stdin </dev/null)
fi
if ! git diff-index --quiet --cached --ignore-submodules $head --
then
die "Working directory has staged changes"
fi
if ! git read-tree -u -m "$commit"
then
die "Could not update working tree to new HEAD"
fi

View File

@@ -0,0 +1,77 @@
#!/bin/sh
# An example hook script to validate a patch (and/or patch series) before
# sending it via email.
#
# The hook should exit with non-zero status after issuing an appropriate
# message if it wants to prevent the email(s) from being sent.
#
# To enable this hook, rename this file to "sendemail-validate".
#
# By default, it will only check that the patch(es) can be applied on top of
# the default upstream branch without conflicts in a secondary worktree. After
# validation (successful or not) of the last patch of a series, the worktree
# will be deleted.
#
# The following config variables can be set to change the default remote and
# remote ref that are used to apply the patches against:
#
# sendemail.validateRemote (default: origin)
# sendemail.validateRemoteRef (default: HEAD)
#
# Replace the TODO placeholders with appropriate checks according to your
# needs.
validate_cover_letter () {
file="$1"
# TODO: Replace with appropriate checks (e.g. spell checking).
true
}
validate_patch () {
file="$1"
# Ensure that the patch applies without conflicts.
git am -3 "$file" || return
# TODO: Replace with appropriate checks for this patch
# (e.g. checkpatch.pl).
true
}
validate_series () {
# TODO: Replace with appropriate checks for the whole series
# (e.g. quick build, coding style checks, etc.).
true
}
# main -------------------------------------------------------------------------
if test "$GIT_SENDEMAIL_FILE_COUNTER" = 1
then
remote=$(git config --default origin --get sendemail.validateRemote) &&
ref=$(git config --default HEAD --get sendemail.validateRemoteRef) &&
worktree=$(mktemp --tmpdir -d sendemail-validate.XXXXXXX) &&
git worktree add -fd --checkout "$worktree" "refs/remotes/$remote/$ref" &&
git config --replace-all sendemail.validateWorktree "$worktree"
else
worktree=$(git config --get sendemail.validateWorktree)
fi || {
echo "sendemail-validate: error: failed to prepare worktree" >&2
exit 1
}
unset GIT_DIR GIT_WORK_TREE
cd "$worktree" &&
if grep -q "^diff --git " "$1"
then
validate_patch "$1"
else
validate_cover_letter "$1"
fi &&
if test "$GIT_SENDEMAIL_FILE_COUNTER" = "$GIT_SENDEMAIL_FILE_TOTAL"
then
git config --unset-all sendemail.validateWorktree &&
trap 'git worktree remove -ff "$worktree"' EXIT &&
validate_series
fi

View File

@@ -0,0 +1,128 @@
#!/bin/sh
#
# An example hook script to block unannotated tags from entering.
# Called by "git receive-pack" with arguments: refname sha1-old sha1-new
#
# To enable this hook, rename this file to "update".
#
# Config
# ------
# hooks.allowunannotated
# This boolean sets whether unannotated tags will be allowed into the
# repository. By default they won't be.
# hooks.allowdeletetag
# This boolean sets whether deleting tags will be allowed in the
# repository. By default they won't be.
# hooks.allowmodifytag
# This boolean sets whether a tag may be modified after creation. By default
# it won't be.
# hooks.allowdeletebranch
# This boolean sets whether deleting branches will be allowed in the
# repository. By default they won't be.
# hooks.denycreatebranch
# This boolean sets whether remotely creating branches will be denied
# in the repository. By default this is allowed.
#
# --- Command line
refname="$1"
oldrev="$2"
newrev="$3"
# --- Safety check
if [ -z "$GIT_DIR" ]; then
echo "Don't run this script from the command line." >&2
echo " (if you want, you could supply GIT_DIR then run" >&2
echo " $0 <ref> <oldrev> <newrev>)" >&2
exit 1
fi
if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then
echo "usage: $0 <ref> <oldrev> <newrev>" >&2
exit 1
fi
# --- Config
allowunannotated=$(git config --type=bool hooks.allowunannotated)
allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch)
denycreatebranch=$(git config --type=bool hooks.denycreatebranch)
allowdeletetag=$(git config --type=bool hooks.allowdeletetag)
allowmodifytag=$(git config --type=bool hooks.allowmodifytag)
# check for no description
projectdesc=$(sed -e '1q' "$GIT_DIR/description")
case "$projectdesc" in
"Unnamed repository"* | "")
echo "*** Project description file hasn't been set" >&2
exit 1
;;
esac
# --- Check types
# if $newrev is 0000...0000, it's a commit to delete a ref.
zero=$(git hash-object --stdin </dev/null | tr '[0-9a-f]' '0')
if [ "$newrev" = "$zero" ]; then
newrev_type=delete
else
newrev_type=$(git cat-file -t $newrev)
fi
case "$refname","$newrev_type" in
refs/tags/*,commit)
# un-annotated tag
short_refname=${refname##refs/tags/}
if [ "$allowunannotated" != "true" ]; then
echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2
echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2
exit 1
fi
;;
refs/tags/*,delete)
# delete tag
if [ "$allowdeletetag" != "true" ]; then
echo "*** Deleting a tag is not allowed in this repository" >&2
exit 1
fi
;;
refs/tags/*,tag)
# annotated tag
if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1
then
echo "*** Tag '$refname' already exists." >&2
echo "*** Modifying a tag is not allowed in this repository." >&2
exit 1
fi
;;
refs/heads/*,commit)
# branch
if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then
echo "*** Creating a branch is not allowed in this repository" >&2
exit 1
fi
;;
refs/heads/*,delete)
# delete branch
if [ "$allowdeletebranch" != "true" ]; then
echo "*** Deleting a branch is not allowed in this repository" >&2
exit 1
fi
;;
refs/remotes/*,commit)
# tracking branch
;;
refs/remotes/*,delete)
# delete tracking branch
if [ "$allowdeletebranch" != "true" ]; then
echo "*** Deleting a tracking branch is not allowed in this repository" >&2
exit 1
fi
;;
*)
# Anything else (is there anything else?)
echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2
exit 1
;;
esac
# --- Finished
exit 0

View File

@@ -0,0 +1 @@
* -export-subst -export-ignore

View File

@@ -0,0 +1,6 @@
# git ls-files --others --exclude-from=.git/info/exclude
# Lines that start with '#' are comments.
# For a project mostly in C, the following would be a good set of
# exclude patterns (uncomment them if you want to use them):
# *.[oa]
# *~

View File

@@ -0,0 +1,2 @@
# pack-refs with: peeled fully-peeled sorted
3e36d6c1c50e2a922fcb90987715f964fd1919b6 refs/heads/master

View File

@@ -0,0 +1,28 @@
post_install() {
sed -i -e 's,.*GRUB_THEME=.*,GRUB_THEME="/usr/share/grub/themes/snigdhaos-grub-theme/theme.txt",' /etc/default/grub
sed -i -e 's,.*GRUB_GFXMODE=.*,GRUB_GFXMODE=auto,' /etc/default/grub
sed -i -e 's,.*GRUB_DISTRIBUTOR=.*,GRUB_DISTRIBUTOR="Snigdha",' /etc/default/grub
grub-mkconfig -o /boot/grub/grub.cfg
cat <<_EOF
==> Installation: Theme is added to your /etc/default/grub: GRUB_THEME="/usr/share/grub/themes/snigdhaos-grub-theme/theme.txt"
==> Default resolution "auto"
_EOF
}
post_upgrade() {
post_install
}
post_remove() {
cat <<_EOF
==> IMPORTANT: Edit /boot/grub/grub.cfg , remove
==> set theme="/boot/grub/themes/snigdhaos-grub-theme/theme.txt"
==> and uncomment an existing one / default!
==> (Maybe without "/boot", depending on PC setup)
_EOF
}

View File

@@ -0,0 +1,12 @@
# Maintainer: CELESTIFYX Team <celestifyx@gmail.com>
pkgname="snigdhaos-keyring"
pkgver=1.0.0
pkgrel=1
pkgdesc="Keyring for Snigdha OS."
arch=("any")
license=("GPL-3.0-or-later")
package() {
cp -r "../usr" "${pkgdir}"
}

View File

@@ -0,0 +1 @@
562A77C6A861DD414139E9B41CC586C7A25E47C5:4:

View File

@@ -0,0 +1,52 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBGd9IbIBEAC57RJta9FlyBHEHhpX1Gy+jB+avwZXRvsMdgyAIvX4Vcc4ZzYv
Z3RTvATZ9MmS7dpijFiFvXUpmUdQV2qeWqwcXpmdqRH0NG3P3uxOhdX9R9PN5RR3
ZpbIUJNkqKu1fEQjELJPkE1D7fI8mea5vpuSZbdNAigdMKKI8wRqcdY1nNI1vLx3
lS8w7vTrBsW+gELvp4zKCAUpPJ7RUbDkBBkTERYdMNEx5yroUU8Wb8O/LKKdF/Jd
rCv5mSwa41rOjQCy4x9FBCkxT9qvASinS+X9Py53+Qn2+lCs509v5YnRua8mLnSh
mD0Y4Qn/NLGZ7wutOP7kEfmK2gc4ks72GSaZKtXNoGovyF3W7PuyojqF2xKhJnxS
jEW0UOMazmR+qge5quZEtXKRIBxc5ctXMg3F8l+Db75L6hz1R31zAt2eiiF+vtr+
MgtxQ01yEIacmcODwVyiZPvOfMj2oFedlehZsI/rnmpNg/AbHpumvLt/Fhcwrwez
3G+TDImtFrvkUZf+k4B3yyh0y4v/Ib4XqRjPjPJyhM8RrRvuwNBZ/0twNT0TXuDD
xMBn4s66hn+EjjPJC7xFfyU4A7b6ZToY5jsH/Um9SuHcsh1T0fBX7bh4RdcEwVhh
GHZmtk6SKmgBxBIj6RSMd0J1543Lj/2ylPFBOqt4gsalQn5RtqtJjiMMFQARAQAB
tCZDRUxFU1RJRllYIFRlYW0gPGNlbGVzdGlmeXhAZ21haWwuY29tPokCUQQTAQgA
OxYhBFYqd8aoYd1BQTnptBzFhseiXkfFBQJnfSGyAhsDBQsJCAcCAiICBhUKCQgL
AgQWAgMBAh4HAheAAAoJEBzFhseiXkfFiOAP/1HYbfs1HcgcOw1X4LIrqrk6ulV5
hodP7y2j7AkNvyAbHQ6fsL5bPzv6qmVEG8OMb+o0aJNBu4j2atHA8NkXhkBUIy0o
gZef8lekTLpl5TacX4+IaYaDLyNfGuyyi392jzvyxw/Q3h0RwWubX9PSRqGpCamX
LkgGzj2rjjjn2FhS8Pb1cz70cFJL+I33mKM6famTisyi7D7ukBnXUIg34pf8RHkg
AQA2X9cqZraTsV12t3W/sIEbteUgn2zrhC4XKEgpMCTcfW5A4QTaY1gaeq6vlZej
tCikHLwvjNxFGlnByTiHW4KIwwRKwdMv7lMTnoPdX4530t517irN2nY27QpLspy6
UoVpuPVbU/I4KNSVqTqoLYe6BCbzqW9Nvn4097ndwjO6MoyNy+5ITw/mTyqcjwZK
Ak+pervYPFIEa8FClACX+d3P6q9ltgdHVns4rSLgSpJvZnGswkw/OzNI/NZGTHgc
mwEXK2WYSyIr0nVTILXPzR4CM8IUrLHaWwq72Y8LkDnW+0wTb4Tq0QsLM0Xpk2ML
pbrWkkOuyO6nBMXZEeVIenvDDlsuHNFCppMf0zzuq0OTKptDZiWADWg9/V+i6m0g
F18/HlQeKzfQkKmtt/i77HYHHB+ETrZvtPZPTK8HnzvQOeSn+DivZGFqcoKwV0wN
5JihohjDjwwP4Um7uQINBGd9IbIBEADkjClPlkv8a8Im17lHH/eAExR2QoJiS4Z+
X8wC/EKfDhpVJweXo3gee0rf7s+1iaLy1ZcHuy26v+mQtYC3GHmNI97h84ZSLO8P
fpmxKrycvBvVQLhiYBIlCUGidVCOpBrStFTIKk/MfDNBnBrCauJ1iFovA0+loltZ
riK6mYwNGX6XfwZVA+pO/tAx9yOsAct3yYcYcW9C+aVck98sAQJV9fs8NfsVXGvf
ywB5X/WY+mKJbGIxdndmdZ9HWtRdBwra/KKtRL0/41G02nN3PD+VcPINJA4V+FyH
JmOpH2Zw2f4oJHFgm5x90/4ulVui6Q0pu40RmSLIfCPzUd6Lg2h9uKrbAiMj1PR1
DxDRu2EXa/RCpCVhg80qlZtEmeIXCw5V1MBBmTJ8Gz0nXVC/U/GlviAvwOi5FKzm
99s4tNCYtuwvTM02cz0565xkQI1FbBiRHDg2zZvN0eKz4/p0Cn0bWZg/OSCetS6f
1mC//UxTf9UUIKgf0yG3KyV3hK98D9kkTzujYCcFcTPH/au5BjB+s4IjEOobRpH0
8u7oJMGp3EeTqeICTbSXifjHaeC0JWgoe37AtenUzispsSA1o7DhxDjTOmw03MzC
Kt5/VxRvmuEm+BMpIdeo89EQEwNxjb17WYRD0kESeUbzkjyQFyWAOYDkmGosjsu0
tv34k06GKQARAQABiQI2BBgBCAAgFiEEVip3xqhh3UFBOem0HMWGx6JeR8UFAmd9
IbICGwwACgkQHMWGx6JeR8UUEQ/7Bsj7qgj5Mi3Vmma4+B6Ial8HSePWBx1oN8PA
a8jAEOAgUsirNUnCf8k4BiP8pouC7h8BcZM6dqn/pbGC2HMmNvFDt8ZYCpvUENf8
63+opXZNPRUz55Ltxnfisnsgq2lbhX1jRafW3R4xeCtMXq238+KpRMyfwt4dzvUZ
4JKAYvYO2G5t9HIA9PbSW/HLVuzGrUr6wZqMxfGKpqsBW3j9xQw1IfwfynXiOuNW
GA193MvzKtPbFwfIUAlKNh2mim8r47ncPAfkuKDHukEAh++73SNT0ZSUiNgtbhe0
4R7xrRKa5F1XxY6dYj+BNBHf15drDbVrBbFJfq3/6+SnQfSrmQD8G+u+uWTs3tAm
ZjDM8qlGsYXZc+DhTVzTt9t05yBmvgK0gQyEfnCD652t4Psi/DXZiDFbMS2B51ML
JAS+RoKj5yLuLekD+iHblRGBj4VGcONMQLRg4MI8CLQUDGVfqkIMwWAdXtSAJvwl
2Pln+r2wM3vJ7GXYXmIH0szKFusdcfgZSK0HkU1CgYEFskcyFI4GnapXWQvzb9Q0
GN0KV5Zeef/KyBU90vQMoMG+7IMJcG0juqgKCi2SBCmDwVMUQzKXwZjkBeC4ByC3
EcfB+X4Bkz+bqDHNpWdv9O/+mD+4wWrHhflPdr5j9KU4pEJlB72wHjRfVBQMRmTf
RGera7o=
=s8ck
-----END PGP PUBLIC KEY BLOCK-----

View File

@@ -0,0 +1,38 @@
# Maintainer: Eshan Roy <eshan@snigdhaos.org>
# Maintainer: CELESTIFYX Team <celestifyx@celestifyx.com>
# Contributor: d3v1l0n <d3v1l0n@outlook.in>
pkgname="snigdhaos-libs"
pkgdesc="Libs for Snigdha OS"
pkgver=1.0.0
pkgrel=1
arch=("any")
license=("GPL-3.0-or-later")
depends=("libnotify"
"expect")
source=("launch-terminal"
"snigdhaos.shlib"
"check-snapshot-boot"
"install-package"
"org.snigdhaos.libs.pkexec.policy"
"pkexec-gui")
sha512sums=("2fec0c2f15a5ebddf6ece386c8e8f82cb5cd8c1bc733d36fb7acfbe02c7c64cfc50e8af0177b9ad0473b5fbf838f27b8eac76d761f312d0c1deba4edf22a9d5e"
"2f774655c434968e3026a80a7628cd4a65f3bf3f26c4aa23388e0fe333ed27891610b08608efc9185e029b70732dbeb35a9f813df15147b2d9b7d2fb7222f2c9"
"11a7b18824976bbb1a7990ed4bbe23c30b7604fa67c311765ecd284a657ca84c2589bb088f432b9969c377bb3e98f96a5ee55bdefaac9925c283635bc890364f"
"b7f63febaa7ff9bd5a3bd44e7b055c230bd742bcd6da8adde86fedd055115181811338e642dfc4cd2466df599a48d58d3527bcd01764203043485148e5f239e0"
"db1a46ea1415144cf7c0b4c8136c16507ac658d9d661ae2d15f0366cfed2c047522f040f9c21d5f9172d64c6a547c0bd0eb0bb41b0805827cb122cd4d8b5ab74"
"e43c1733654cd31b6f26cb41c063ad4b87aca2e3d92e29d4533c41c3369c3e602824fe70a2556b2d5707dd16e66e7586470e44281a79510b38dfa129c6323bdc")
package() {
install -Dm755 "launch-terminal" "${pkgdir}"/usr/lib/snigdhaos/launch-terminal
install -Dm755 "install-package" "${pkgdir}"/usr/lib/snigdhaos/install-package
install -Dm755 "check-snapshot-boot" "${pkgdir}"/usr/lib/snigdhaos/check-snapshot-boot
install -Dm755 "pkexec-gui" "${pkgdir}"/usr/lib/snigdhaos/pkexec-gui
install -Dm644 "snigdhaos.shlib" "${pkgdir}"/usr/lib/snigdhaos/snigdhaos.shlib
install -d "${pkgdir}/var/lib/snigdhaos/tmp"
install -Dm0644 "org.snigdhaos.libs.pkexec.policy" "${pkgdir}/usr/share/polkit-1/actions/org.snigdhaos.libs.pkexec.policy"
}

View File

@@ -0,0 +1,17 @@
#!/usr/bin/env bash
# Check if /proc/cmdline exists
if [[ -f "/proc/cmdline" ]]; then
# Check if booting from a Btrfs snapshot
if grep -qE 'subvol=@/.snapshots/[0-9]+/snapshot' /proc/cmdline; then
echo "Booting from a Btrfs snapshot.";
exit 0
else
echo "Not booting from a Btrfs snapshot.";
exit 1
fi
else
# Handle the case where /proc/cmdline is missing
echo "Error: /proc/cmdline not found.";
exit 2
fi

View File

@@ -0,0 +1,25 @@
#!/usr/bin/env bash
set -e
# Determine whether to use GUI authentication based on environment and variable
SNIGDHAOSLIB_GUI="${SNIGDHAOSLIB_GUI:-true}"
# If running in a non-graphical environment, disable GUI authentication
if [ -z "$DISPLAY" ]; then
SNIGDHAOSLIB_GUI=false
fi
# Check if we need to run with elevated privileges and handle accordingly
if [[ $EUID -ne 0 ]] && [ "$SNIGDHAOSLIB_GUI" == "true" ]; then
# Use pkexec to elevate with GUI if necessary
exec pkexec /usr/lib/snigdhaos/install-package "$@";
exit 1
fi
# Use sudo for elevation if we are not using pkexec
if [[ $EUID -ne 0 ]]; then
sudo pacman -S --noconfirm "$@"
else
# If we're already root, simply run pacman
pacman -S --noconfirm "$@"
fi

View File

@@ -0,0 +1,126 @@
#!/usr/bin/env bash
set -e
# Color definitions
RESET="\033[0m"
BOLD="\033[1m"
RED="\033[1;31m"
GREEN="\033[1;32m"
YELLOW="\033[1;33m"
BLUE="\033[1;34m"
CYAN="\033[1;36m"
# Default shell
LAUNCH_TERMINAL_SHELL="bash"
function usage() {
# Use echo to output the help message with colors
echo -e "${BOLD}Usage:${RESET} ${0##*/} [cmd] [options]"
echo -e ""
echo -e "${BOLD}Options:${RESET}"
echo -e " -s [shell] Change the shell to [shell]."
echo -e " -h Display this help message."
echo -e ""
echo -e "${BOLD}Description:${RESET}"
echo -e " This script launches a specified command in an appropriate terminal emulator,"
echo -e " automatically detecting the best option based on the desktop environment."
echo -e ""
echo -e "${BOLD}Examples:${RESET}"
echo -e " ${CYAN}${0##*/} \"echo Hello World\" -s zsh${RESET}"
exit "${1:-0}"
}
# Parse command-line options
while getopts "s:h" arg; do
case "${arg}" in
s) LAUNCH_TERMINAL_SHELL="${OPTARG}" ;;
h | ?) usage 0 ;;
*)
echo -e "${RED}Invalid argument: '${arg}'${RESET}";
usage 1
;;
esac
done
shift "$((OPTIND - 1))"
# Validate input command
if [ "$#" -lt 1 ]; then
echo -e "${RED}Error:${RESET} A command is required to execute."
usage 1
fi
COMMAND="${1}"
# Detect terminal emulator
declare -A terminals=(["alacritty"]="alacritty -e bash -c"
["konsole"]="konsole -e bash -c"
["kgx"]="kgx -- bash -c"
["gnome-terminal"]="gnome-terminal -- bash -c"
["xfce4-terminal"]="xfce4-terminal --disable-server --command"
["qterminal"]="qterminal -e bash -c"
["lxterminal"]="lxterminal -e bash -c"
["mate-terminal"]="mate-terminal --disable-factory -e bash -c"
["xterm"]="xterm -e bash -c"
["foot"]="foot -T exec-terminal -e bash -c")
term_order=("alacritty"
"konsole"
"kgx"
"gnome-terminal"
"mate-terminal"
"xfce4-terminal"
"qterminal"
"lxterminal"
"xterm"
"foot")
# Desktop environment-specific terminal preference
case "${XDG_CURRENT_DESKTOP}" in
KDE) terminal="konsole" ;;
GNOME)
if command -v "kgx" &>/dev/null; then
terminal="kgx"
else
terminal="gnome-terminal"
fi
;;
XFCE) terminal="xfce4-terminal" ;;
LXQt) terminal="qterminal" ;;
MATE) terminal="mate-terminal" ;;
esac
# Fallback: Check for available terminals
if [ -z "${terminal}" ] || ! command -v "${terminal}" &>/dev/null; then
for i in "${term_order[@]}"; do
if command -v "${i}" &>/dev/null; then
terminal="${i}"
break
fi
done
fi
# Error handling if no terminal is found
if [ -z "${terminal}" ]; then
echo -e "${RED}Error:${RESET} No terminal emulator found!";
notify-send -t 1500 --app-name="Terminal Launcher" "No terminal emulator found!";
exit 1
fi
# Debug detected terminal
echo -e "${YELLOW}Detected terminal:${RESET} ${BOLD}${terminal}${RESET}"
# Launch the command in the terminal
echo -e "${CYAN}Launching command:${RESET} ${BOLD}${COMMAND}${RESET}"
eval "${terminals[${terminal}]} \"${COMMAND}\"" || {
echo -e "${RED}Failed to launch command!${RESET}";
exit 2
}
# Success message
echo -e "${GREEN}Command executed successfully in terminal!${RESET}"

View File

@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD polkit Policy Configuration 1.0//EN" "http://www.freedesktop.org/software/polkit/policyconfig-1.dtd">
<policyconfig>
<!-- Vendor Information -->
<vendor>Snigdha OS</vendor>
<vendor_url>https://snigdhaos.org</vendor_url>
<!-- Policy for Installing Packages -->
<action id="org.snigdhaos.package.install">
<description>Install software using the pacman package manager</description>
<message>Administrator authentication is required to install software using pacman.</message>
<icon_name>snigdhaos-pacman</icon_name>
<defaults>
<allow_any>no</allow_any>
<allow_inactive>no</allow_inactive>
<allow_active>auth_admin</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/lib/snigdhaos/install-package</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
<!-- Policy for Running Graphical Programs with Elevated Privileges -->
<action id="org.snigdhaos.graphical.run-as-root">
<description>Run graphical applications with administrative privileges</description>
<message>Administrator authentication is required to run this graphical application with elevated privileges.</message>
<icon_name>snigdhaos-root-gui</icon_name>
<defaults>
<allow_any>no</allow_any>
<allow_inactive>no</allow_inactive>
<allow_active>auth_admin</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/lib/snigdhaos/pkexec-gui</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
</policyconfig>

View File

@@ -0,0 +1,32 @@
#!/usr/bin/env bash
# Ensure pkexec is available
if ! command -v pkexec &>/dev/null; then
echo "Error: 'pkexec' is not installed. Please install PolicyKit to proceed.";
exit 1
fi
# Check if the script is being run as root
if [[ "${EUID}" -ne 0 ]]; then
# Attempt to elevate privileges and rerun the script with pkexec
exec pkexec /usr/lib/snigdhaos/pkexec-gui "$@";
exit 1
fi
# Export environment variables from the parent process
# ShellCheck Directive: Allow environment variables to be read and exported from /proc
# shellcheck disable=SC2163
while IFS= read -rd '' var; do
export "${var}"
done < <(grep --null-data -ae "^\($XDG_CURRENT_DESKTOP\|WAYLAND_DISPLAY\|XDG_RUNTIME_DIR\|XDG_SESSION_TYPE\|XCURSOR_SIZE\|LC_.*\|LANG\|LANGUAGE\|QT_WAYLAND_FORCE_DPI\|QT_QPA_PLATFORMTHEME\|QT_STYLE_OVERRIDE\)=" /proc/$PPID/environ)
# Adjust WAYLAND_DISPLAY if running on Wayland
if [[ -n "${WAYLAND_DISPLAY}" ]]; then
export WAYLAND_DISPLAY="${XDG_RUNTIME_DIR}/${WAYLAND_DISPLAY}"
fi
# Set the root user's runtime directory
export XDG_RUNTIME_DIR="/run/user/0"
# Execute the provided command with root privileges
exec "$@"

View File

@@ -0,0 +1,30 @@
#!/usr/bin/env bash
function snigdhaoslib_add_update_notice() {
# Ensure the directory exists
if ! mkdir -p /var/lib/snigdhaos/tmp; then
echo "Error: Failed to create directory /var/lib/snigdhaos/tmp" >&2;
return 1
fi
# Get the current date
current_date="$(date +%F)"
# Ensure the input message is not empty
if [ -z "${1}" ]; then
echo "Error: No update message provided." >&2;
return 1
fi
# Replace multiple spaces with a single space
message="${1//[[:space:]]+/ }"
# Append the message to the file with the current date
if ! printf "%s %s\n" "${current_date}" "${message}" >> /var/lib/snigdhaos/tmp/update_notices; then
echo "Error: Failed to write to /var/lib/snigdhaos/tmp/update_notices" >&2;
return 1
fi
# Optionally, display a success message (for debugging/logging purposes)
echo "Update notice successfully added for ${current_date}."
}

View File

@@ -0,0 +1,28 @@
# Maintainer: RiO <d3v1l0n@outlook.in>
# Maintainer: CELESTIFYX Team <celestifyx@gmail.com>
pkgname="snigdhaos-lsb-release"
pkgver=1.0.0
pkgrel=1
pkgdesc="LSB version query program for Snigdha OS"
arch=("any")
license=("GPL-3.0-or-later")
depends=("sh")
makedepends=("git")
source=("git+https://github.com/LinuxStandardBase/lsb-samples.git#commit=a25a4fcd73c79bd5af0dd8d948a7c96dcbfd2d07"
"lsb-release"
"lsb_release_make_man_page_reproducible.patch")
sha512sums=("SKIP"
"de463a4e2de77595cffe1c7259f6513facec6ab77ba8441290a7a5c3e9c640512fafb937ffe88cc9df49954ed65316899e1191be8eff44868b7bdbe6b0a8e008"
"3c9356d5ea2d6b0dcb1f8f2e30bf30fb22210f367303446a13d35df2647b77eb9a08075db97c753eb379196efe1f9758bff974c43ace02ba7f86abde2425d2d6")
package() {
patch -d lsb-samples/lsb_release/src -Np1 -i "${srcdir}/lsb_release_make_man_page_reproducible.patch"
make -C lsb-samples/lsb_release/src
install -Dm755 "lsb-samples/lsb_release/src/lsb_release" -t "${pkgdir}/usr/bin"
install -Dm644 "lsb-samples/lsb_release/src/lsb_release.1.gz" -t "${pkgdir}/usr/share/man/man1"
install -Dm644 "lsb-release" -t "${pkgdir}/etc"
}

View File

@@ -0,0 +1,3 @@
DISTRIB_ID="Arch"
DISTRIB_RELEASE="rolling"
DISTRIB_DESCRIPTION="Snigdha OS"

View File

@@ -0,0 +1,7 @@
a25a4fcd73c79bd5af0dd8d948a7c96dcbfd2d07 not-for-merge branch 'master' of https://github.com/LinuxStandardBase/lsb-samples
256132b04e72c053e447b9db6eec0ce9fcf4f0ee not-for-merge 'refs/pull/1/head' of https://github.com/LinuxStandardBase/lsb-samples
a96796346529df82d9bb4f3497a09ade5a80e30b not-for-merge 'refs/pull/1/merge' of https://github.com/LinuxStandardBase/lsb-samples
9e651c3fa43ce4d7e89b3390153e2dcd889c9b8d not-for-merge 'refs/pull/3/head' of https://github.com/LinuxStandardBase/lsb-samples
a86f885597a91cd41837d706bf6a08d4c239a54b not-for-merge 'refs/pull/4/head' of https://github.com/LinuxStandardBase/lsb-samples
bda485a856eb685f303a25dc42fcbd2cf1de1c8b not-for-merge 'refs/pull/5/head' of https://github.com/LinuxStandardBase/lsb-samples
f848e33b1bf2e9bbc8eb5cd78cb770f49c706209 not-for-merge 'refs/pull/5/merge' of https://github.com/LinuxStandardBase/lsb-samples

View File

@@ -0,0 +1 @@
ref: refs/heads/master

View File

@@ -0,0 +1,8 @@
[core]
repositoryformatversion = 0
filemode = true
bare = true
[remote "origin"]
url = https://github.com/LinuxStandardBase/lsb-samples.git
fetch = +refs/*:refs/*
mirror = true

View File

@@ -0,0 +1 @@
Unnamed repository; edit this file 'description' to name the repository.

View File

@@ -0,0 +1,15 @@
#!/bin/sh
#
# An example hook script to check the commit log message taken by
# applypatch from an e-mail message.
#
# The hook should exit with non-zero status after issuing an
# appropriate message if it wants to stop the commit. The hook is
# allowed to edit the commit message file.
#
# To enable this hook, rename this file to "applypatch-msg".
. git-sh-setup
commitmsg="$(git rev-parse --git-path hooks/commit-msg)"
test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"}
:

View File

@@ -0,0 +1,24 @@
#!/bin/sh
#
# An example hook script to check the commit log message.
# Called by "git commit" with one argument, the name of the file
# that has the commit message. The hook should exit with non-zero
# status after issuing an appropriate message if it wants to stop the
# commit. The hook is allowed to edit the commit message file.
#
# To enable this hook, rename this file to "commit-msg".
# Uncomment the below to add a Signed-off-by line to the message.
# Doing this in a hook is a bad idea in general, but the prepare-commit-msg
# hook is more suited to it.
#
# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
# This example catches duplicate Signed-off-by lines.
test "" = "$(grep '^Signed-off-by: ' "$1" |
sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || {
echo >&2 Duplicate Signed-off-by lines.
exit 1
}

View File

@@ -0,0 +1,174 @@
#!/usr/bin/perl
use strict;
use warnings;
use IPC::Open2;
# An example hook script to integrate Watchman
# (https://facebook.github.io/watchman/) with git to speed up detecting
# new and modified files.
#
# The hook is passed a version (currently 2) and last update token
# formatted as a string and outputs to stdout a new update token and
# all files that have been modified since the update token. Paths must
# be relative to the root of the working tree and separated by a single NUL.
#
# To enable this hook, rename this file to "query-watchman" and set
# 'git config core.fsmonitor .git/hooks/query-watchman'
#
my ($version, $last_update_token) = @ARGV;
# Uncomment for debugging
# print STDERR "$0 $version $last_update_token\n";
# Check the hook interface version
if ($version ne 2) {
die "Unsupported query-fsmonitor hook version '$version'.\n" .
"Falling back to scanning...\n";
}
my $git_work_tree = get_working_dir();
my $retry = 1;
my $json_pkg;
eval {
require JSON::XS;
$json_pkg = "JSON::XS";
1;
} or do {
require JSON::PP;
$json_pkg = "JSON::PP";
};
launch_watchman();
sub launch_watchman {
my $o = watchman_query();
if (is_work_tree_watched($o)) {
output_result($o->{clock}, @{$o->{files}});
}
}
sub output_result {
my ($clockid, @files) = @_;
# Uncomment for debugging watchman output
# open (my $fh, ">", ".git/watchman-output.out");
# binmode $fh, ":utf8";
# print $fh "$clockid\n@files\n";
# close $fh;
binmode STDOUT, ":utf8";
print $clockid;
print "\0";
local $, = "\0";
print @files;
}
sub watchman_clock {
my $response = qx/watchman clock "$git_work_tree"/;
die "Failed to get clock id on '$git_work_tree'.\n" .
"Falling back to scanning...\n" if $? != 0;
return $json_pkg->new->utf8->decode($response);
}
sub watchman_query {
my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty')
or die "open2() failed: $!\n" .
"Falling back to scanning...\n";
# In the query expression below we're asking for names of files that
# changed since $last_update_token but not from the .git folder.
#
# To accomplish this, we're using the "since" generator to use the
# recency index to select candidate nodes and "fields" to limit the
# output to file names only. Then we're using the "expression" term to
# further constrain the results.
my $last_update_line = "";
if (substr($last_update_token, 0, 1) eq "c") {
$last_update_token = "\"$last_update_token\"";
$last_update_line = qq[\n"since": $last_update_token,];
}
my $query = <<" END";
["query", "$git_work_tree", {$last_update_line
"fields": ["name"],
"expression": ["not", ["dirname", ".git"]]
}]
END
# Uncomment for debugging the watchman query
# open (my $fh, ">", ".git/watchman-query.json");
# print $fh $query;
# close $fh;
print CHLD_IN $query;
close CHLD_IN;
my $response = do {local $/; <CHLD_OUT>};
# Uncomment for debugging the watch response
# open ($fh, ">", ".git/watchman-response.json");
# print $fh $response;
# close $fh;
die "Watchman: command returned no output.\n" .
"Falling back to scanning...\n" if $response eq "";
die "Watchman: command returned invalid output: $response\n" .
"Falling back to scanning...\n" unless $response =~ /^\{/;
return $json_pkg->new->utf8->decode($response);
}
sub is_work_tree_watched {
my ($output) = @_;
my $error = $output->{error};
if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) {
$retry--;
my $response = qx/watchman watch "$git_work_tree"/;
die "Failed to make watchman watch '$git_work_tree'.\n" .
"Falling back to scanning...\n" if $? != 0;
$output = $json_pkg->new->utf8->decode($response);
$error = $output->{error};
die "Watchman: $error.\n" .
"Falling back to scanning...\n" if $error;
# Uncomment for debugging watchman output
# open (my $fh, ">", ".git/watchman-output.out");
# close $fh;
# Watchman will always return all files on the first query so
# return the fast "everything is dirty" flag to git and do the
# Watchman query just to get it over with now so we won't pay
# the cost in git to look up each individual file.
my $o = watchman_clock();
$error = $output->{error};
die "Watchman: $error.\n" .
"Falling back to scanning...\n" if $error;
output_result($o->{clock}, ("/"));
$last_update_token = $o->{clock};
eval { launch_watchman() };
return 0;
}
die "Watchman: $error.\n" .
"Falling back to scanning...\n" if $error;
return 1;
}
sub get_working_dir {
my $working_dir;
if ($^O =~ 'msys' || $^O =~ 'cygwin') {
$working_dir = Win32::GetCwd();
$working_dir =~ tr/\\/\//;
} else {
require Cwd;
$working_dir = Cwd::cwd();
}
return $working_dir;
}

View File

@@ -0,0 +1,8 @@
#!/bin/sh
#
# An example hook script to prepare a packed repository for use over
# dumb transports.
#
# To enable this hook, rename this file to "post-update".
exec git update-server-info

View File

@@ -0,0 +1,14 @@
#!/bin/sh
#
# An example hook script to verify what is about to be committed
# by applypatch from an e-mail message.
#
# The hook should exit with non-zero status after issuing an
# appropriate message if it wants to stop the commit.
#
# To enable this hook, rename this file to "pre-applypatch".
. git-sh-setup
precommit="$(git rev-parse --git-path hooks/pre-commit)"
test -x "$precommit" && exec "$precommit" ${1+"$@"}
:

View File

@@ -0,0 +1,49 @@
#!/bin/sh
#
# An example hook script to verify what is about to be committed.
# Called by "git commit" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
#
# To enable this hook, rename this file to "pre-commit".
if git rev-parse --verify HEAD >/dev/null 2>&1
then
against=HEAD
else
# Initial commit: diff against an empty tree object
against=$(git hash-object -t tree /dev/null)
fi
# If you want to allow non-ASCII filenames set this variable to true.
allownonascii=$(git config --type=bool hooks.allownonascii)
# Redirect output to stderr.
exec 1>&2
# Cross platform projects tend to avoid non-ASCII filenames; prevent
# them from being added to the repository. We exploit the fact that the
# printable range starts at the space character and ends with tilde.
if [ "$allownonascii" != "true" ] &&
# Note that the use of brackets around a tr range is ok here, (it's
# even required, for portability to Solaris 10's /usr/bin/tr), since
# the square bracket bytes happen to fall in the designated range.
test $(git diff-index --cached --name-only --diff-filter=A -z $against |
LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0
then
cat <<\EOF
Error: Attempt to add a non-ASCII file name.
This can cause problems if you want to work with people on other platforms.
To be portable it is advisable to rename the file.
If you know what you are doing you can disable this check using:
git config hooks.allownonascii true
EOF
exit 1
fi
# If there are whitespace errors, print the offending file names and fail.
exec git diff-index --check --cached $against --

View File

@@ -0,0 +1,13 @@
#!/bin/sh
#
# An example hook script to verify what is about to be committed.
# Called by "git merge" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message to
# stderr if it wants to stop the merge commit.
#
# To enable this hook, rename this file to "pre-merge-commit".
. git-sh-setup
test -x "$GIT_DIR/hooks/pre-commit" &&
exec "$GIT_DIR/hooks/pre-commit"
:

View File

@@ -0,0 +1,53 @@
#!/bin/sh
# An example hook script to verify what is about to be pushed. Called by "git
# push" after it has checked the remote status, but before anything has been
# pushed. If this script exits with a non-zero status nothing will be pushed.
#
# This hook is called with the following parameters:
#
# $1 -- Name of the remote to which the push is being done
# $2 -- URL to which the push is being done
#
# If pushing without using a named remote those arguments will be equal.
#
# Information about the commits which are being pushed is supplied as lines to
# the standard input in the form:
#
# <local ref> <local oid> <remote ref> <remote oid>
#
# This sample shows how to prevent push of commits where the log message starts
# with "WIP" (work in progress).
remote="$1"
url="$2"
zero=$(git hash-object --stdin </dev/null | tr '[0-9a-f]' '0')
while read local_ref local_oid remote_ref remote_oid
do
if test "$local_oid" = "$zero"
then
# Handle delete
:
else
if test "$remote_oid" = "$zero"
then
# New branch, examine all commits
range="$local_oid"
else
# Update to existing branch, examine new commits
range="$remote_oid..$local_oid"
fi
# Check for WIP commit
commit=$(git rev-list -n 1 --grep '^WIP' "$range")
if test -n "$commit"
then
echo >&2 "Found WIP commit in $local_ref, not pushing"
exit 1
fi
fi
done
exit 0

View File

@@ -0,0 +1,169 @@
#!/bin/sh
#
# Copyright (c) 2006, 2008 Junio C Hamano
#
# The "pre-rebase" hook is run just before "git rebase" starts doing
# its job, and can prevent the command from running by exiting with
# non-zero status.
#
# The hook is called with the following parameters:
#
# $1 -- the upstream the series was forked from.
# $2 -- the branch being rebased (or empty when rebasing the current branch).
#
# This sample shows how to prevent topic branches that are already
# merged to 'next' branch from getting rebased, because allowing it
# would result in rebasing already published history.
publish=next
basebranch="$1"
if test "$#" = 2
then
topic="refs/heads/$2"
else
topic=`git symbolic-ref HEAD` ||
exit 0 ;# we do not interrupt rebasing detached HEAD
fi
case "$topic" in
refs/heads/??/*)
;;
*)
exit 0 ;# we do not interrupt others.
;;
esac
# Now we are dealing with a topic branch being rebased
# on top of master. Is it OK to rebase it?
# Does the topic really exist?
git show-ref -q "$topic" || {
echo >&2 "No such branch $topic"
exit 1
}
# Is topic fully merged to master?
not_in_master=`git rev-list --pretty=oneline ^master "$topic"`
if test -z "$not_in_master"
then
echo >&2 "$topic is fully merged to master; better remove it."
exit 1 ;# we could allow it, but there is no point.
fi
# Is topic ever merged to next? If so you should not be rebasing it.
only_next_1=`git rev-list ^master "^$topic" ${publish} | sort`
only_next_2=`git rev-list ^master ${publish} | sort`
if test "$only_next_1" = "$only_next_2"
then
not_in_topic=`git rev-list "^$topic" master`
if test -z "$not_in_topic"
then
echo >&2 "$topic is already up to date with master"
exit 1 ;# we could allow it, but there is no point.
else
exit 0
fi
else
not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"`
/usr/bin/perl -e '
my $topic = $ARGV[0];
my $msg = "* $topic has commits already merged to public branch:\n";
my (%not_in_next) = map {
/^([0-9a-f]+) /;
($1 => 1);
} split(/\n/, $ARGV[1]);
for my $elem (map {
/^([0-9a-f]+) (.*)$/;
[$1 => $2];
} split(/\n/, $ARGV[2])) {
if (!exists $not_in_next{$elem->[0]}) {
if ($msg) {
print STDERR $msg;
undef $msg;
}
print STDERR " $elem->[1]\n";
}
}
' "$topic" "$not_in_next" "$not_in_master"
exit 1
fi
<<\DOC_END
This sample hook safeguards topic branches that have been
published from being rewound.
The workflow assumed here is:
* Once a topic branch forks from "master", "master" is never
merged into it again (either directly or indirectly).
* Once a topic branch is fully cooked and merged into "master",
it is deleted. If you need to build on top of it to correct
earlier mistakes, a new topic branch is created by forking at
the tip of the "master". This is not strictly necessary, but
it makes it easier to keep your history simple.
* Whenever you need to test or publish your changes to topic
branches, merge them into "next" branch.
The script, being an example, hardcodes the publish branch name
to be "next", but it is trivial to make it configurable via
$GIT_DIR/config mechanism.
With this workflow, you would want to know:
(1) ... if a topic branch has ever been merged to "next". Young
topic branches can have stupid mistakes you would rather
clean up before publishing, and things that have not been
merged into other branches can be easily rebased without
affecting other people. But once it is published, you would
not want to rewind it.
(2) ... if a topic branch has been fully merged to "master".
Then you can delete it. More importantly, you should not
build on top of it -- other people may already want to
change things related to the topic as patches against your
"master", so if you need further changes, it is better to
fork the topic (perhaps with the same name) afresh from the
tip of "master".
Let's look at this example:
o---o---o---o---o---o---o---o---o---o "next"
/ / / /
/ a---a---b A / /
/ / / /
/ / c---c---c---c B /
/ / / \ /
/ / / b---b C \ /
/ / / / \ /
---o---o---o---o---o---o---o---o---o---o---o "master"
A, B and C are topic branches.
* A has one fix since it was merged up to "next".
* B has finished. It has been fully merged up to "master" and "next",
and is ready to be deleted.
* C has not merged to "next" at all.
We would want to allow C to be rebased, refuse A, and encourage
B to be deleted.
To compute (1):
git rev-list ^master ^topic next
git rev-list ^master next
if these match, topic has not merged in next at all.
To compute (2):
git rev-list master..topic
if this is empty, it is fully merged to "master".
DOC_END

View File

@@ -0,0 +1,24 @@
#!/bin/sh
#
# An example hook script to make use of push options.
# The example simply echoes all push options that start with 'echoback='
# and rejects all pushes when the "reject" push option is used.
#
# To enable this hook, rename this file to "pre-receive".
if test -n "$GIT_PUSH_OPTION_COUNT"
then
i=0
while test "$i" -lt "$GIT_PUSH_OPTION_COUNT"
do
eval "value=\$GIT_PUSH_OPTION_$i"
case "$value" in
echoback=*)
echo "echo from the pre-receive-hook: ${value#*=}" >&2
;;
reject)
exit 1
esac
i=$((i + 1))
done
fi

View File

@@ -0,0 +1,42 @@
#!/bin/sh
#
# An example hook script to prepare the commit log message.
# Called by "git commit" with the name of the file that has the
# commit message, followed by the description of the commit
# message's source. The hook's purpose is to edit the commit
# message file. If the hook fails with a non-zero status,
# the commit is aborted.
#
# To enable this hook, rename this file to "prepare-commit-msg".
# This hook includes three examples. The first one removes the
# "# Please enter the commit message..." help message.
#
# The second includes the output of "git diff --name-status -r"
# into the message, just before the "git status" output. It is
# commented because it doesn't cope with --amend or with squashed
# commits.
#
# The third example adds a Signed-off-by line to the message, that can
# still be edited. This is rarely a good idea.
COMMIT_MSG_FILE=$1
COMMIT_SOURCE=$2
SHA1=$3
/usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE"
# case "$COMMIT_SOURCE,$SHA1" in
# ,|template,)
# /usr/bin/perl -i.bak -pe '
# print "\n" . `git diff --cached --name-status -r`
# if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;;
# *) ;;
# esac
# SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
# git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE"
# if test -z "$COMMIT_SOURCE"
# then
# /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE"
# fi

View File

@@ -0,0 +1,78 @@
#!/bin/sh
# An example hook script to update a checked-out tree on a git push.
#
# This hook is invoked by git-receive-pack(1) when it reacts to git
# push and updates reference(s) in its repository, and when the push
# tries to update the branch that is currently checked out and the
# receive.denyCurrentBranch configuration variable is set to
# updateInstead.
#
# By default, such a push is refused if the working tree and the index
# of the remote repository has any difference from the currently
# checked out commit; when both the working tree and the index match
# the current commit, they are updated to match the newly pushed tip
# of the branch. This hook is to be used to override the default
# behaviour; however the code below reimplements the default behaviour
# as a starting point for convenient modification.
#
# The hook receives the commit with which the tip of the current
# branch is going to be updated:
commit=$1
# It can exit with a non-zero status to refuse the push (when it does
# so, it must not modify the index or the working tree).
die () {
echo >&2 "$*"
exit 1
}
# Or it can make any necessary changes to the working tree and to the
# index to bring them to the desired state when the tip of the current
# branch is updated to the new commit, and exit with a zero status.
#
# For example, the hook can simply run git read-tree -u -m HEAD "$1"
# in order to emulate git fetch that is run in the reverse direction
# with git push, as the two-tree form of git read-tree -u -m is
# essentially the same as git switch or git checkout that switches
# branches while keeping the local changes in the working tree that do
# not interfere with the difference between the branches.
# The below is a more-or-less exact translation to shell of the C code
# for the default behaviour for git's push-to-checkout hook defined in
# the push_to_deploy() function in builtin/receive-pack.c.
#
# Note that the hook will be executed from the repository directory,
# not from the working tree, so if you want to perform operations on
# the working tree, you will have to adapt your code accordingly, e.g.
# by adding "cd .." or using relative paths.
if ! git update-index -q --ignore-submodules --refresh
then
die "Up-to-date check failed"
fi
if ! git diff-files --quiet --ignore-submodules --
then
die "Working directory has unstaged changes"
fi
# This is a rough translation of:
#
# head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX
if git cat-file -e HEAD 2>/dev/null
then
head=HEAD
else
head=$(git hash-object -t tree --stdin </dev/null)
fi
if ! git diff-index --quiet --cached --ignore-submodules $head --
then
die "Working directory has staged changes"
fi
if ! git read-tree -u -m "$commit"
then
die "Could not update working tree to new HEAD"
fi

View File

@@ -0,0 +1,77 @@
#!/bin/sh
# An example hook script to validate a patch (and/or patch series) before
# sending it via email.
#
# The hook should exit with non-zero status after issuing an appropriate
# message if it wants to prevent the email(s) from being sent.
#
# To enable this hook, rename this file to "sendemail-validate".
#
# By default, it will only check that the patch(es) can be applied on top of
# the default upstream branch without conflicts in a secondary worktree. After
# validation (successful or not) of the last patch of a series, the worktree
# will be deleted.
#
# The following config variables can be set to change the default remote and
# remote ref that are used to apply the patches against:
#
# sendemail.validateRemote (default: origin)
# sendemail.validateRemoteRef (default: HEAD)
#
# Replace the TODO placeholders with appropriate checks according to your
# needs.
validate_cover_letter () {
file="$1"
# TODO: Replace with appropriate checks (e.g. spell checking).
true
}
validate_patch () {
file="$1"
# Ensure that the patch applies without conflicts.
git am -3 "$file" || return
# TODO: Replace with appropriate checks for this patch
# (e.g. checkpatch.pl).
true
}
validate_series () {
# TODO: Replace with appropriate checks for the whole series
# (e.g. quick build, coding style checks, etc.).
true
}
# main -------------------------------------------------------------------------
if test "$GIT_SENDEMAIL_FILE_COUNTER" = 1
then
remote=$(git config --default origin --get sendemail.validateRemote) &&
ref=$(git config --default HEAD --get sendemail.validateRemoteRef) &&
worktree=$(mktemp --tmpdir -d sendemail-validate.XXXXXXX) &&
git worktree add -fd --checkout "$worktree" "refs/remotes/$remote/$ref" &&
git config --replace-all sendemail.validateWorktree "$worktree"
else
worktree=$(git config --get sendemail.validateWorktree)
fi || {
echo "sendemail-validate: error: failed to prepare worktree" >&2
exit 1
}
unset GIT_DIR GIT_WORK_TREE
cd "$worktree" &&
if grep -q "^diff --git " "$1"
then
validate_patch "$1"
else
validate_cover_letter "$1"
fi &&
if test "$GIT_SENDEMAIL_FILE_COUNTER" = "$GIT_SENDEMAIL_FILE_TOTAL"
then
git config --unset-all sendemail.validateWorktree &&
trap 'git worktree remove -ff "$worktree"' EXIT &&
validate_series
fi

View File

@@ -0,0 +1,128 @@
#!/bin/sh
#
# An example hook script to block unannotated tags from entering.
# Called by "git receive-pack" with arguments: refname sha1-old sha1-new
#
# To enable this hook, rename this file to "update".
#
# Config
# ------
# hooks.allowunannotated
# This boolean sets whether unannotated tags will be allowed into the
# repository. By default they won't be.
# hooks.allowdeletetag
# This boolean sets whether deleting tags will be allowed in the
# repository. By default they won't be.
# hooks.allowmodifytag
# This boolean sets whether a tag may be modified after creation. By default
# it won't be.
# hooks.allowdeletebranch
# This boolean sets whether deleting branches will be allowed in the
# repository. By default they won't be.
# hooks.denycreatebranch
# This boolean sets whether remotely creating branches will be denied
# in the repository. By default this is allowed.
#
# --- Command line
refname="$1"
oldrev="$2"
newrev="$3"
# --- Safety check
if [ -z "$GIT_DIR" ]; then
echo "Don't run this script from the command line." >&2
echo " (if you want, you could supply GIT_DIR then run" >&2
echo " $0 <ref> <oldrev> <newrev>)" >&2
exit 1
fi
if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then
echo "usage: $0 <ref> <oldrev> <newrev>" >&2
exit 1
fi
# --- Config
allowunannotated=$(git config --type=bool hooks.allowunannotated)
allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch)
denycreatebranch=$(git config --type=bool hooks.denycreatebranch)
allowdeletetag=$(git config --type=bool hooks.allowdeletetag)
allowmodifytag=$(git config --type=bool hooks.allowmodifytag)
# check for no description
projectdesc=$(sed -e '1q' "$GIT_DIR/description")
case "$projectdesc" in
"Unnamed repository"* | "")
echo "*** Project description file hasn't been set" >&2
exit 1
;;
esac
# --- Check types
# if $newrev is 0000...0000, it's a commit to delete a ref.
zero=$(git hash-object --stdin </dev/null | tr '[0-9a-f]' '0')
if [ "$newrev" = "$zero" ]; then
newrev_type=delete
else
newrev_type=$(git cat-file -t $newrev)
fi
case "$refname","$newrev_type" in
refs/tags/*,commit)
# un-annotated tag
short_refname=${refname##refs/tags/}
if [ "$allowunannotated" != "true" ]; then
echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2
echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2
exit 1
fi
;;
refs/tags/*,delete)
# delete tag
if [ "$allowdeletetag" != "true" ]; then
echo "*** Deleting a tag is not allowed in this repository" >&2
exit 1
fi
;;
refs/tags/*,tag)
# annotated tag
if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1
then
echo "*** Tag '$refname' already exists." >&2
echo "*** Modifying a tag is not allowed in this repository." >&2
exit 1
fi
;;
refs/heads/*,commit)
# branch
if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then
echo "*** Creating a branch is not allowed in this repository" >&2
exit 1
fi
;;
refs/heads/*,delete)
# delete branch
if [ "$allowdeletebranch" != "true" ]; then
echo "*** Deleting a branch is not allowed in this repository" >&2
exit 1
fi
;;
refs/remotes/*,commit)
# tracking branch
;;
refs/remotes/*,delete)
# delete tracking branch
if [ "$allowdeletebranch" != "true" ]; then
echo "*** Deleting a tracking branch is not allowed in this repository" >&2
exit 1
fi
;;
*)
# Anything else (is there anything else?)
echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2
exit 1
;;
esac
# --- Finished
exit 0

View File

@@ -0,0 +1 @@
* -export-subst -export-ignore

View File

@@ -0,0 +1,6 @@
# git ls-files --others --exclude-from=.git/info/exclude
# Lines that start with '#' are comments.
# For a project mostly in C, the following would be a good set of
# exclude patterns (uncomment them if you want to use them):
# *.[oa]
# *~

View File

@@ -0,0 +1,8 @@
# pack-refs with: peeled fully-peeled sorted
a25a4fcd73c79bd5af0dd8d948a7c96dcbfd2d07 refs/heads/master
256132b04e72c053e447b9db6eec0ce9fcf4f0ee refs/pull/1/head
a96796346529df82d9bb4f3497a09ade5a80e30b refs/pull/1/merge
9e651c3fa43ce4d7e89b3390153e2dcd889c9b8d refs/pull/3/head
a86f885597a91cd41837d706bf6a08d4c239a54b refs/pull/4/head
bda485a856eb685f303a25dc42fcbd2cf1de1c8b refs/pull/5/head
f848e33b1bf2e9bbc8eb5cd78cb770f49c706209 refs/pull/5/merge

View File

@@ -0,0 +1,34 @@
From 1f5eb29ad59e7302e0407855333fbf1377f6f127 Mon Sep 17 00:00:00 2001
From: Jonas Witschel <diabonas@archlinux.org>
Date: Sat, 11 Jul 2020 17:02:59 +0200
Subject: [PATCH] Make man page reproducible
Respect SOURCE_DATE_EPOCH and remove the embedded timestamp from the gzipped
man page.
---
Makefile | 2 +-
help2man | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--- a/Makefile
+++ b/Makefile
@@ -22,7 +22,7 @@ man: lsb_release.1.gz
lsb_release.1.gz: lsb_release
@./help2man -N --include ./lsb_release.examples --alt_version_key=program_version ./lsb_release >lsb_release.1
- @gzip -9f lsb_release.1
+ @gzip -9f -n lsb_release.1
install: all
install -D -m 644 lsb_release.1.gz ${mandir}/man1/lsb_release.1.gz
--- a/help2man
+++ b/help2man
@@ -173,7 +173,7 @@ my ($help_text, $version_text) = map {
or die "$this_program: can't get `--$_' info from $ARGV[0]\n"
} qw(help), $opt_version_key;
-my $date = strftime "%B %Y", localtime;
+my $date = strftime "%B %Y", gmtime($ENV{SOURCE_DATE_EPOCH} || time);
(my $program = $ARGV[0]) =~ s!.*/!!;
my $package = $program;
my $version;

View File

@@ -0,0 +1,17 @@
# Maintainer: Eshan Roy <eshan@snigdhaos.org>
# Maintainer: CELESTIFYX Team <celestifyx@gmail.com>
pkgname="snigdhaos-mirrorlist"
pkgver=1.0.0
pkgrel=1
pkgdesc="Snigdha OS mirrorlist."
arch=("any")
license=("GPL-3.0-or-later")
backup=("etc/pacman.d/snigdhaos-mirrorlist")
source=("snigdhaos-mirrorlist")
sha512sums=("335ed6d95f76a3590dd8a99c7970e53f426c57487163373b8b0d7b62783fbbc83e232e57275d2e076de9f416c9710e6c6fd25da1b23304f01f979ed49072cce9")
package() {
install -Dm644 "${pkgname}" -t "${pkgdir}/etc/pacman.d/"
}

View File

@@ -0,0 +1,8 @@
######################################################
#### ####
#### Snigdha OS Repository Mirrorlist ####
#### ####
######################################################
# Worldwide
Server = https://snigdha-os.github.io/$repo/$arch

View File

@@ -0,0 +1,31 @@
# Maintainer: Eshan Roy <m.eshanized@gmail.com>
pkgname="snigdhaos-sddm-sugar-candy"
pkgver=1.0.0
pkgrel=1
pkgdesc="Sugar Candy is the sweetest login theme available for the SDDM display manager."
arch=("any")
license=("GPL-3.0-or-later")
makedepends=("git")
provides=("sddm-sugar-candy")
conflicts=("sddm-sugar-candy")
backup=("usr/share/sddm/themes/snigdhaos-sugar-candy/theme.conf")
depends=("sddm"
"qt5-graphicaleffects"
"qt5-quickcontrols2"
"qt5-svg")
source=("git+https://github.com/Snigdha-OS/snigdhaos-sugar-candy.git")
sha512sums=("SKIP")
package() {
cd "${srcdir}/snigdhaos-sugar-candy"
install -Dm644 "Main.qml" "${pkgdir}/usr/share/sddm/themes/snigdhaos-sugar-candy/Main.qml"
install -Dm644 "theme.conf" "${pkgdir}/usr/share/sddm/themes/snigdhaos-sugar-candy/theme.conf"
install -Dm644 "metadata.desktop" "${pkgdir}/usr/share/sddm/themes/snigdhaos-sugar-candy/metadata.desktop"
find "./Assets" -type f -exec install -Dm644 {} "${pkgdir}/usr/share/sddm/themes/snigdhaos-sugar-candy/{}" \;
find "./Backgrounds" -type f -exec install -Dm644 {} "${pkgdir}/usr/share/sddm/themes/snigdhaos-sugar-candy/{}" \;
find "./Components" -type f -exec install -Dm644 {} "${pkgdir}/usr/share/sddm/themes/snigdhaos-sugar-candy/{}" \;
}

View File

@@ -0,0 +1 @@
ref: refs/heads/master

View File

@@ -0,0 +1,8 @@
[core]
repositoryformatversion = 0
filemode = true
bare = true
[remote "origin"]
url = https://github.com/Snigdha-OS/snigdhaos-sugar-candy.git
fetch = +refs/*:refs/*
mirror = true

View File

@@ -0,0 +1 @@
Unnamed repository; edit this file 'description' to name the repository.

View File

@@ -0,0 +1,15 @@
#!/bin/sh
#
# An example hook script to check the commit log message taken by
# applypatch from an e-mail message.
#
# The hook should exit with non-zero status after issuing an
# appropriate message if it wants to stop the commit. The hook is
# allowed to edit the commit message file.
#
# To enable this hook, rename this file to "applypatch-msg".
. git-sh-setup
commitmsg="$(git rev-parse --git-path hooks/commit-msg)"
test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"}
:

View File

@@ -0,0 +1,24 @@
#!/bin/sh
#
# An example hook script to check the commit log message.
# Called by "git commit" with one argument, the name of the file
# that has the commit message. The hook should exit with non-zero
# status after issuing an appropriate message if it wants to stop the
# commit. The hook is allowed to edit the commit message file.
#
# To enable this hook, rename this file to "commit-msg".
# Uncomment the below to add a Signed-off-by line to the message.
# Doing this in a hook is a bad idea in general, but the prepare-commit-msg
# hook is more suited to it.
#
# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
# This example catches duplicate Signed-off-by lines.
test "" = "$(grep '^Signed-off-by: ' "$1" |
sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || {
echo >&2 Duplicate Signed-off-by lines.
exit 1
}

View File

@@ -0,0 +1,174 @@
#!/usr/bin/perl
use strict;
use warnings;
use IPC::Open2;
# An example hook script to integrate Watchman
# (https://facebook.github.io/watchman/) with git to speed up detecting
# new and modified files.
#
# The hook is passed a version (currently 2) and last update token
# formatted as a string and outputs to stdout a new update token and
# all files that have been modified since the update token. Paths must
# be relative to the root of the working tree and separated by a single NUL.
#
# To enable this hook, rename this file to "query-watchman" and set
# 'git config core.fsmonitor .git/hooks/query-watchman'
#
my ($version, $last_update_token) = @ARGV;
# Uncomment for debugging
# print STDERR "$0 $version $last_update_token\n";
# Check the hook interface version
if ($version ne 2) {
die "Unsupported query-fsmonitor hook version '$version'.\n" .
"Falling back to scanning...\n";
}
my $git_work_tree = get_working_dir();
my $retry = 1;
my $json_pkg;
eval {
require JSON::XS;
$json_pkg = "JSON::XS";
1;
} or do {
require JSON::PP;
$json_pkg = "JSON::PP";
};
launch_watchman();
sub launch_watchman {
my $o = watchman_query();
if (is_work_tree_watched($o)) {
output_result($o->{clock}, @{$o->{files}});
}
}
sub output_result {
my ($clockid, @files) = @_;
# Uncomment for debugging watchman output
# open (my $fh, ">", ".git/watchman-output.out");
# binmode $fh, ":utf8";
# print $fh "$clockid\n@files\n";
# close $fh;
binmode STDOUT, ":utf8";
print $clockid;
print "\0";
local $, = "\0";
print @files;
}
sub watchman_clock {
my $response = qx/watchman clock "$git_work_tree"/;
die "Failed to get clock id on '$git_work_tree'.\n" .
"Falling back to scanning...\n" if $? != 0;
return $json_pkg->new->utf8->decode($response);
}
sub watchman_query {
my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty')
or die "open2() failed: $!\n" .
"Falling back to scanning...\n";
# In the query expression below we're asking for names of files that
# changed since $last_update_token but not from the .git folder.
#
# To accomplish this, we're using the "since" generator to use the
# recency index to select candidate nodes and "fields" to limit the
# output to file names only. Then we're using the "expression" term to
# further constrain the results.
my $last_update_line = "";
if (substr($last_update_token, 0, 1) eq "c") {
$last_update_token = "\"$last_update_token\"";
$last_update_line = qq[\n"since": $last_update_token,];
}
my $query = <<" END";
["query", "$git_work_tree", {$last_update_line
"fields": ["name"],
"expression": ["not", ["dirname", ".git"]]
}]
END
# Uncomment for debugging the watchman query
# open (my $fh, ">", ".git/watchman-query.json");
# print $fh $query;
# close $fh;
print CHLD_IN $query;
close CHLD_IN;
my $response = do {local $/; <CHLD_OUT>};
# Uncomment for debugging the watch response
# open ($fh, ">", ".git/watchman-response.json");
# print $fh $response;
# close $fh;
die "Watchman: command returned no output.\n" .
"Falling back to scanning...\n" if $response eq "";
die "Watchman: command returned invalid output: $response\n" .
"Falling back to scanning...\n" unless $response =~ /^\{/;
return $json_pkg->new->utf8->decode($response);
}
sub is_work_tree_watched {
my ($output) = @_;
my $error = $output->{error};
if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) {
$retry--;
my $response = qx/watchman watch "$git_work_tree"/;
die "Failed to make watchman watch '$git_work_tree'.\n" .
"Falling back to scanning...\n" if $? != 0;
$output = $json_pkg->new->utf8->decode($response);
$error = $output->{error};
die "Watchman: $error.\n" .
"Falling back to scanning...\n" if $error;
# Uncomment for debugging watchman output
# open (my $fh, ">", ".git/watchman-output.out");
# close $fh;
# Watchman will always return all files on the first query so
# return the fast "everything is dirty" flag to git and do the
# Watchman query just to get it over with now so we won't pay
# the cost in git to look up each individual file.
my $o = watchman_clock();
$error = $output->{error};
die "Watchman: $error.\n" .
"Falling back to scanning...\n" if $error;
output_result($o->{clock}, ("/"));
$last_update_token = $o->{clock};
eval { launch_watchman() };
return 0;
}
die "Watchman: $error.\n" .
"Falling back to scanning...\n" if $error;
return 1;
}
sub get_working_dir {
my $working_dir;
if ($^O =~ 'msys' || $^O =~ 'cygwin') {
$working_dir = Win32::GetCwd();
$working_dir =~ tr/\\/\//;
} else {
require Cwd;
$working_dir = Cwd::cwd();
}
return $working_dir;
}

View File

@@ -0,0 +1,8 @@
#!/bin/sh
#
# An example hook script to prepare a packed repository for use over
# dumb transports.
#
# To enable this hook, rename this file to "post-update".
exec git update-server-info

View File

@@ -0,0 +1,14 @@
#!/bin/sh
#
# An example hook script to verify what is about to be committed
# by applypatch from an e-mail message.
#
# The hook should exit with non-zero status after issuing an
# appropriate message if it wants to stop the commit.
#
# To enable this hook, rename this file to "pre-applypatch".
. git-sh-setup
precommit="$(git rev-parse --git-path hooks/pre-commit)"
test -x "$precommit" && exec "$precommit" ${1+"$@"}
:

View File

@@ -0,0 +1,49 @@
#!/bin/sh
#
# An example hook script to verify what is about to be committed.
# Called by "git commit" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
#
# To enable this hook, rename this file to "pre-commit".
if git rev-parse --verify HEAD >/dev/null 2>&1
then
against=HEAD
else
# Initial commit: diff against an empty tree object
against=$(git hash-object -t tree /dev/null)
fi
# If you want to allow non-ASCII filenames set this variable to true.
allownonascii=$(git config --type=bool hooks.allownonascii)
# Redirect output to stderr.
exec 1>&2
# Cross platform projects tend to avoid non-ASCII filenames; prevent
# them from being added to the repository. We exploit the fact that the
# printable range starts at the space character and ends with tilde.
if [ "$allownonascii" != "true" ] &&
# Note that the use of brackets around a tr range is ok here, (it's
# even required, for portability to Solaris 10's /usr/bin/tr), since
# the square bracket bytes happen to fall in the designated range.
test $(git diff-index --cached --name-only --diff-filter=A -z $against |
LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0
then
cat <<\EOF
Error: Attempt to add a non-ASCII file name.
This can cause problems if you want to work with people on other platforms.
To be portable it is advisable to rename the file.
If you know what you are doing you can disable this check using:
git config hooks.allownonascii true
EOF
exit 1
fi
# If there are whitespace errors, print the offending file names and fail.
exec git diff-index --check --cached $against --

View File

@@ -0,0 +1,13 @@
#!/bin/sh
#
# An example hook script to verify what is about to be committed.
# Called by "git merge" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message to
# stderr if it wants to stop the merge commit.
#
# To enable this hook, rename this file to "pre-merge-commit".
. git-sh-setup
test -x "$GIT_DIR/hooks/pre-commit" &&
exec "$GIT_DIR/hooks/pre-commit"
:

View File

@@ -0,0 +1,53 @@
#!/bin/sh
# An example hook script to verify what is about to be pushed. Called by "git
# push" after it has checked the remote status, but before anything has been
# pushed. If this script exits with a non-zero status nothing will be pushed.
#
# This hook is called with the following parameters:
#
# $1 -- Name of the remote to which the push is being done
# $2 -- URL to which the push is being done
#
# If pushing without using a named remote those arguments will be equal.
#
# Information about the commits which are being pushed is supplied as lines to
# the standard input in the form:
#
# <local ref> <local oid> <remote ref> <remote oid>
#
# This sample shows how to prevent push of commits where the log message starts
# with "WIP" (work in progress).
remote="$1"
url="$2"
zero=$(git hash-object --stdin </dev/null | tr '[0-9a-f]' '0')
while read local_ref local_oid remote_ref remote_oid
do
if test "$local_oid" = "$zero"
then
# Handle delete
:
else
if test "$remote_oid" = "$zero"
then
# New branch, examine all commits
range="$local_oid"
else
# Update to existing branch, examine new commits
range="$remote_oid..$local_oid"
fi
# Check for WIP commit
commit=$(git rev-list -n 1 --grep '^WIP' "$range")
if test -n "$commit"
then
echo >&2 "Found WIP commit in $local_ref, not pushing"
exit 1
fi
fi
done
exit 0

View File

@@ -0,0 +1,169 @@
#!/bin/sh
#
# Copyright (c) 2006, 2008 Junio C Hamano
#
# The "pre-rebase" hook is run just before "git rebase" starts doing
# its job, and can prevent the command from running by exiting with
# non-zero status.
#
# The hook is called with the following parameters:
#
# $1 -- the upstream the series was forked from.
# $2 -- the branch being rebased (or empty when rebasing the current branch).
#
# This sample shows how to prevent topic branches that are already
# merged to 'next' branch from getting rebased, because allowing it
# would result in rebasing already published history.
publish=next
basebranch="$1"
if test "$#" = 2
then
topic="refs/heads/$2"
else
topic=`git symbolic-ref HEAD` ||
exit 0 ;# we do not interrupt rebasing detached HEAD
fi
case "$topic" in
refs/heads/??/*)
;;
*)
exit 0 ;# we do not interrupt others.
;;
esac
# Now we are dealing with a topic branch being rebased
# on top of master. Is it OK to rebase it?
# Does the topic really exist?
git show-ref -q "$topic" || {
echo >&2 "No such branch $topic"
exit 1
}
# Is topic fully merged to master?
not_in_master=`git rev-list --pretty=oneline ^master "$topic"`
if test -z "$not_in_master"
then
echo >&2 "$topic is fully merged to master; better remove it."
exit 1 ;# we could allow it, but there is no point.
fi
# Is topic ever merged to next? If so you should not be rebasing it.
only_next_1=`git rev-list ^master "^$topic" ${publish} | sort`
only_next_2=`git rev-list ^master ${publish} | sort`
if test "$only_next_1" = "$only_next_2"
then
not_in_topic=`git rev-list "^$topic" master`
if test -z "$not_in_topic"
then
echo >&2 "$topic is already up to date with master"
exit 1 ;# we could allow it, but there is no point.
else
exit 0
fi
else
not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"`
/usr/bin/perl -e '
my $topic = $ARGV[0];
my $msg = "* $topic has commits already merged to public branch:\n";
my (%not_in_next) = map {
/^([0-9a-f]+) /;
($1 => 1);
} split(/\n/, $ARGV[1]);
for my $elem (map {
/^([0-9a-f]+) (.*)$/;
[$1 => $2];
} split(/\n/, $ARGV[2])) {
if (!exists $not_in_next{$elem->[0]}) {
if ($msg) {
print STDERR $msg;
undef $msg;
}
print STDERR " $elem->[1]\n";
}
}
' "$topic" "$not_in_next" "$not_in_master"
exit 1
fi
<<\DOC_END
This sample hook safeguards topic branches that have been
published from being rewound.
The workflow assumed here is:
* Once a topic branch forks from "master", "master" is never
merged into it again (either directly or indirectly).
* Once a topic branch is fully cooked and merged into "master",
it is deleted. If you need to build on top of it to correct
earlier mistakes, a new topic branch is created by forking at
the tip of the "master". This is not strictly necessary, but
it makes it easier to keep your history simple.
* Whenever you need to test or publish your changes to topic
branches, merge them into "next" branch.
The script, being an example, hardcodes the publish branch name
to be "next", but it is trivial to make it configurable via
$GIT_DIR/config mechanism.
With this workflow, you would want to know:
(1) ... if a topic branch has ever been merged to "next". Young
topic branches can have stupid mistakes you would rather
clean up before publishing, and things that have not been
merged into other branches can be easily rebased without
affecting other people. But once it is published, you would
not want to rewind it.
(2) ... if a topic branch has been fully merged to "master".
Then you can delete it. More importantly, you should not
build on top of it -- other people may already want to
change things related to the topic as patches against your
"master", so if you need further changes, it is better to
fork the topic (perhaps with the same name) afresh from the
tip of "master".
Let's look at this example:
o---o---o---o---o---o---o---o---o---o "next"
/ / / /
/ a---a---b A / /
/ / / /
/ / c---c---c---c B /
/ / / \ /
/ / / b---b C \ /
/ / / / \ /
---o---o---o---o---o---o---o---o---o---o---o "master"
A, B and C are topic branches.
* A has one fix since it was merged up to "next".
* B has finished. It has been fully merged up to "master" and "next",
and is ready to be deleted.
* C has not merged to "next" at all.
We would want to allow C to be rebased, refuse A, and encourage
B to be deleted.
To compute (1):
git rev-list ^master ^topic next
git rev-list ^master next
if these match, topic has not merged in next at all.
To compute (2):
git rev-list master..topic
if this is empty, it is fully merged to "master".
DOC_END

View File

@@ -0,0 +1,24 @@
#!/bin/sh
#
# An example hook script to make use of push options.
# The example simply echoes all push options that start with 'echoback='
# and rejects all pushes when the "reject" push option is used.
#
# To enable this hook, rename this file to "pre-receive".
if test -n "$GIT_PUSH_OPTION_COUNT"
then
i=0
while test "$i" -lt "$GIT_PUSH_OPTION_COUNT"
do
eval "value=\$GIT_PUSH_OPTION_$i"
case "$value" in
echoback=*)
echo "echo from the pre-receive-hook: ${value#*=}" >&2
;;
reject)
exit 1
esac
i=$((i + 1))
done
fi

View File

@@ -0,0 +1,42 @@
#!/bin/sh
#
# An example hook script to prepare the commit log message.
# Called by "git commit" with the name of the file that has the
# commit message, followed by the description of the commit
# message's source. The hook's purpose is to edit the commit
# message file. If the hook fails with a non-zero status,
# the commit is aborted.
#
# To enable this hook, rename this file to "prepare-commit-msg".
# This hook includes three examples. The first one removes the
# "# Please enter the commit message..." help message.
#
# The second includes the output of "git diff --name-status -r"
# into the message, just before the "git status" output. It is
# commented because it doesn't cope with --amend or with squashed
# commits.
#
# The third example adds a Signed-off-by line to the message, that can
# still be edited. This is rarely a good idea.
COMMIT_MSG_FILE=$1
COMMIT_SOURCE=$2
SHA1=$3
/usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE"
# case "$COMMIT_SOURCE,$SHA1" in
# ,|template,)
# /usr/bin/perl -i.bak -pe '
# print "\n" . `git diff --cached --name-status -r`
# if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;;
# *) ;;
# esac
# SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
# git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE"
# if test -z "$COMMIT_SOURCE"
# then
# /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE"
# fi

View File

@@ -0,0 +1,78 @@
#!/bin/sh
# An example hook script to update a checked-out tree on a git push.
#
# This hook is invoked by git-receive-pack(1) when it reacts to git
# push and updates reference(s) in its repository, and when the push
# tries to update the branch that is currently checked out and the
# receive.denyCurrentBranch configuration variable is set to
# updateInstead.
#
# By default, such a push is refused if the working tree and the index
# of the remote repository has any difference from the currently
# checked out commit; when both the working tree and the index match
# the current commit, they are updated to match the newly pushed tip
# of the branch. This hook is to be used to override the default
# behaviour; however the code below reimplements the default behaviour
# as a starting point for convenient modification.
#
# The hook receives the commit with which the tip of the current
# branch is going to be updated:
commit=$1
# It can exit with a non-zero status to refuse the push (when it does
# so, it must not modify the index or the working tree).
die () {
echo >&2 "$*"
exit 1
}
# Or it can make any necessary changes to the working tree and to the
# index to bring them to the desired state when the tip of the current
# branch is updated to the new commit, and exit with a zero status.
#
# For example, the hook can simply run git read-tree -u -m HEAD "$1"
# in order to emulate git fetch that is run in the reverse direction
# with git push, as the two-tree form of git read-tree -u -m is
# essentially the same as git switch or git checkout that switches
# branches while keeping the local changes in the working tree that do
# not interfere with the difference between the branches.
# The below is a more-or-less exact translation to shell of the C code
# for the default behaviour for git's push-to-checkout hook defined in
# the push_to_deploy() function in builtin/receive-pack.c.
#
# Note that the hook will be executed from the repository directory,
# not from the working tree, so if you want to perform operations on
# the working tree, you will have to adapt your code accordingly, e.g.
# by adding "cd .." or using relative paths.
if ! git update-index -q --ignore-submodules --refresh
then
die "Up-to-date check failed"
fi
if ! git diff-files --quiet --ignore-submodules --
then
die "Working directory has unstaged changes"
fi
# This is a rough translation of:
#
# head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX
if git cat-file -e HEAD 2>/dev/null
then
head=HEAD
else
head=$(git hash-object -t tree --stdin </dev/null)
fi
if ! git diff-index --quiet --cached --ignore-submodules $head --
then
die "Working directory has staged changes"
fi
if ! git read-tree -u -m "$commit"
then
die "Could not update working tree to new HEAD"
fi

View File

@@ -0,0 +1,77 @@
#!/bin/sh
# An example hook script to validate a patch (and/or patch series) before
# sending it via email.
#
# The hook should exit with non-zero status after issuing an appropriate
# message if it wants to prevent the email(s) from being sent.
#
# To enable this hook, rename this file to "sendemail-validate".
#
# By default, it will only check that the patch(es) can be applied on top of
# the default upstream branch without conflicts in a secondary worktree. After
# validation (successful or not) of the last patch of a series, the worktree
# will be deleted.
#
# The following config variables can be set to change the default remote and
# remote ref that are used to apply the patches against:
#
# sendemail.validateRemote (default: origin)
# sendemail.validateRemoteRef (default: HEAD)
#
# Replace the TODO placeholders with appropriate checks according to your
# needs.
validate_cover_letter () {
file="$1"
# TODO: Replace with appropriate checks (e.g. spell checking).
true
}
validate_patch () {
file="$1"
# Ensure that the patch applies without conflicts.
git am -3 "$file" || return
# TODO: Replace with appropriate checks for this patch
# (e.g. checkpatch.pl).
true
}
validate_series () {
# TODO: Replace with appropriate checks for the whole series
# (e.g. quick build, coding style checks, etc.).
true
}
# main -------------------------------------------------------------------------
if test "$GIT_SENDEMAIL_FILE_COUNTER" = 1
then
remote=$(git config --default origin --get sendemail.validateRemote) &&
ref=$(git config --default HEAD --get sendemail.validateRemoteRef) &&
worktree=$(mktemp --tmpdir -d sendemail-validate.XXXXXXX) &&
git worktree add -fd --checkout "$worktree" "refs/remotes/$remote/$ref" &&
git config --replace-all sendemail.validateWorktree "$worktree"
else
worktree=$(git config --get sendemail.validateWorktree)
fi || {
echo "sendemail-validate: error: failed to prepare worktree" >&2
exit 1
}
unset GIT_DIR GIT_WORK_TREE
cd "$worktree" &&
if grep -q "^diff --git " "$1"
then
validate_patch "$1"
else
validate_cover_letter "$1"
fi &&
if test "$GIT_SENDEMAIL_FILE_COUNTER" = "$GIT_SENDEMAIL_FILE_TOTAL"
then
git config --unset-all sendemail.validateWorktree &&
trap 'git worktree remove -ff "$worktree"' EXIT &&
validate_series
fi

View File

@@ -0,0 +1,128 @@
#!/bin/sh
#
# An example hook script to block unannotated tags from entering.
# Called by "git receive-pack" with arguments: refname sha1-old sha1-new
#
# To enable this hook, rename this file to "update".
#
# Config
# ------
# hooks.allowunannotated
# This boolean sets whether unannotated tags will be allowed into the
# repository. By default they won't be.
# hooks.allowdeletetag
# This boolean sets whether deleting tags will be allowed in the
# repository. By default they won't be.
# hooks.allowmodifytag
# This boolean sets whether a tag may be modified after creation. By default
# it won't be.
# hooks.allowdeletebranch
# This boolean sets whether deleting branches will be allowed in the
# repository. By default they won't be.
# hooks.denycreatebranch
# This boolean sets whether remotely creating branches will be denied
# in the repository. By default this is allowed.
#
# --- Command line
refname="$1"
oldrev="$2"
newrev="$3"
# --- Safety check
if [ -z "$GIT_DIR" ]; then
echo "Don't run this script from the command line." >&2
echo " (if you want, you could supply GIT_DIR then run" >&2
echo " $0 <ref> <oldrev> <newrev>)" >&2
exit 1
fi
if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then
echo "usage: $0 <ref> <oldrev> <newrev>" >&2
exit 1
fi
# --- Config
allowunannotated=$(git config --type=bool hooks.allowunannotated)
allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch)
denycreatebranch=$(git config --type=bool hooks.denycreatebranch)
allowdeletetag=$(git config --type=bool hooks.allowdeletetag)
allowmodifytag=$(git config --type=bool hooks.allowmodifytag)
# check for no description
projectdesc=$(sed -e '1q' "$GIT_DIR/description")
case "$projectdesc" in
"Unnamed repository"* | "")
echo "*** Project description file hasn't been set" >&2
exit 1
;;
esac
# --- Check types
# if $newrev is 0000...0000, it's a commit to delete a ref.
zero=$(git hash-object --stdin </dev/null | tr '[0-9a-f]' '0')
if [ "$newrev" = "$zero" ]; then
newrev_type=delete
else
newrev_type=$(git cat-file -t $newrev)
fi
case "$refname","$newrev_type" in
refs/tags/*,commit)
# un-annotated tag
short_refname=${refname##refs/tags/}
if [ "$allowunannotated" != "true" ]; then
echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2
echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2
exit 1
fi
;;
refs/tags/*,delete)
# delete tag
if [ "$allowdeletetag" != "true" ]; then
echo "*** Deleting a tag is not allowed in this repository" >&2
exit 1
fi
;;
refs/tags/*,tag)
# annotated tag
if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1
then
echo "*** Tag '$refname' already exists." >&2
echo "*** Modifying a tag is not allowed in this repository." >&2
exit 1
fi
;;
refs/heads/*,commit)
# branch
if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then
echo "*** Creating a branch is not allowed in this repository" >&2
exit 1
fi
;;
refs/heads/*,delete)
# delete branch
if [ "$allowdeletebranch" != "true" ]; then
echo "*** Deleting a branch is not allowed in this repository" >&2
exit 1
fi
;;
refs/remotes/*,commit)
# tracking branch
;;
refs/remotes/*,delete)
# delete tracking branch
if [ "$allowdeletebranch" != "true" ]; then
echo "*** Deleting a tracking branch is not allowed in this repository" >&2
exit 1
fi
;;
*)
# Anything else (is there anything else?)
echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2
exit 1
;;
esac
# --- Finished
exit 0

View File

@@ -0,0 +1 @@
* -export-subst -export-ignore

View File

@@ -0,0 +1,6 @@
# git ls-files --others --exclude-from=.git/info/exclude
# Lines that start with '#' are comments.
# For a project mostly in C, the following would be a good set of
# exclude patterns (uncomment them if you want to use them):
# *.[oa]
# *~

View File

@@ -0,0 +1,2 @@
# pack-refs with: peeled fully-peeled sorted
082c801cc637d53ec0d4b5e428e2467f27f26632 refs/heads/master

View File

@@ -0,0 +1,41 @@
# Maintainer: Eshan Roy <eshan@snigdhaos.org>
# Maintainer: CELESTIFYX Team <celestifyx@gmail.com>
# Contributor: RiO <d3v1l0n@outlook.in>
pkgname="snigdhaos-welcome"
pkgver=1.0.0
pkgrel=1
pkgdesc="Snigdha OS Welcome App"
arch=("any")
license=("GPL-3.0-or-later")
makedepends=("git")
depends=("libwnck3"
"arandr")
provides=("${pkgname}")
conflicts=("${pkgname}-dev")
install="${pkgname}.install"
options=("!strip"
"!emptydirs")
source=("${pkgname}::git+https://github.com/Snigdha-OS/${pkgname}")
sha512sums=("SKIP")
package() {
_destname1="/etc/skel/.config/"
_destname2="/usr/"
# Install configuration files to the user"s default skeleton directory
mkdir -p "${pkgdir}${_destname1}"
cp -r "${srcdir}/${pkgname}/${_destname1}/"* "${pkgdir}${_destname1}"
# Install the main application files to /usr
mkdir -p "${pkgdir}${_destname2}"
cp -r "${srcdir}/${pkgname}/${_destname2}/"* "${pkgdir}${_destname2}"
# Optionally clean up any unnecessary files (e.g., .git, build files, etc.)
# This ensures the final package only contains the necessary files
find "${pkgdir}" -type f -name "*.git*" -exec rm -f {} \;
}

Some files were not shown because too many files have changed in this diff Show More