Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hamara-scripts
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
isaagar
hamara-scripts
Commits
10aa4374
Commit
10aa4374
authored
Mar 01, 2017
by
isaagar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add package checker scripts
parent
d2008df8
Pipeline
#414
skipped
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
99 additions
and
0 deletions
+99
-0
jenkins-cli.jar
package-checker/jenkins-cli.jar
+0
-0
package_list
package-checker/package_list
+10
-0
parikshan
package-checker/parikshan
+89
-0
No files found.
package-checker/jenkins-cli.jar
0 → 100644
View file @
10aa4374
File added
package-checker/package_list
0 → 100644
View file @
10aa4374
base-files
choose-mirror
debian-installer-launcher
debootstrap
desktop-base
localechooser
mate-desktop-environment
mate-menu
mate-panel
rootskel-gtk
package-checker/parikshan
0 → 100755
View file @
10aa4374
#!/bin/bash
SET_IT
()
{
PKG_NAME
=
$PKG
UP_PKG
=
"http://packages.debian.org/stretch/
$PKG_NAME
"
#UP_MIR="http://pack"
#UP_PKG_LINK="$UP_MIR/"$(echo $PKG_NAME | head -c 1)"$PKG_NAME"
#DOWN_MIR="http://devel.hamaralinux.org/hamara-sugam/pool/main"
DOWN_PKG
=
"http://devel.hamaralinux.org/hamara-sugam/pool/main/""
$(
echo
$PKG_NAME
|
head
-c
1
)
"
/
$PKG_NAME
/
echo
-e
"Package link in hamara repo :
\n
"
$DOWN_PKG
#using w3m for fetching page content from upstream and getting version
UP_VER
=
"
$(
w3m
$UP_PKG
|
grep
"Package:
$PKG_NAME
"
|
tr
-dc
'0-9'
)
"
echo
"Upstream version : "
$UP_VER
COUNT
=
"
$(
echo
"
${#
UP_VER
}
"
)
"
#echo $COUNT
DOWN_VER
=
"
$(
w3m
-dump
$DOWN_PKG
|
grep
-oh
"
$PKG_NAME
.*hamara.*
\.
dsc"
)
"
if
[
$?
-eq
1
]
then
echo
"Package is not available at hamara repo"
# exit 0
else
DOWN_VER
=
"
$(
echo
$DOWN_VER
|
tr
-dc
'0-9'
|
head
-c
$COUNT
)
"
echo
"Downstram version : "
$DOWN_VER
fi
}
CHECK_IT
(){
ARCH
=
"
$(
w3m
-dump
https://tracker.debian.org/pkg/
$PKG_NAME
|
grep
"arch:"
)
"
echo
"Arch variable contains -> "
$ARCH
if
[
"
$UP_VER
"
-eq
"
$DOWN_VER
"
]
;
then
echo
-e
"
\n
Package
$PKG_NAME
is sync with upstream "
# notify-send -u normal "Package $PKG_NAME is sync with upstream"
elif
[
"
$UP_VER
"
-gt
"
$DOWN_VER
"
]
;
then
echo
" Package
$PKG_NAME
is old"
echo
" Get the new version "
#Run the build job for package
BUILD_IT
fi
}
BUILD_IT
()
{
#check arch of package
echo
$ARCH
|
grep
-q
"any"
if
[
$?
-eq
0
]
then
ARCH
=
"amd64-i386"
else
ARCH
=
"all"
fi
#Check if jar file is present
if
ls
jenkins-cli.jar
>
/dev/null 2>&1
then
java
-jar
jenkins-cli.jar
-s
http://81.187.108.82:8080/ build
$PKG_NAME
-
$ARCH
else
echo
-e
"
\n
Jenkins JAR file is not present"
echo
-e
"
\t
#### Fetching JAR fie ####"
wget http://devel.hamaralinux.org:8080/jnlpJars/jenkins-cli.jar
#Start build again
BUILD_IT
fi
}
DIR
=
"
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
"
&&
pwd
)
"
cd
$DIR
while
read
PKG
#for i in base-files choose-mirror debootstrap desktop-base debian-installer-launcher localechooser mate-desktop-environment mate-menu mate-panel rootskel-gtk
do
echo
-e
"
\n\t
############## Checking pacakge
$PKG
##############"
SET_IT
CHECK_IT
done
< package_list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment